15
15
16
16
import java .util .ArrayList ;
17
17
import java .util .Collections ;
18
- import java .util .Comparator ;
19
18
import java .util .HashMap ;
20
19
import java .util .HashSet ;
21
20
import java .util .Iterator ;
@@ -147,6 +146,7 @@ public void checkCall(final ClassContext context, final ClassNode classNode, fin
147
146
*
148
147
* @return The methods that have a bundle as param
149
148
*/
149
+ @ SuppressWarnings ("unchecked" )
150
150
@ Nonnull
151
151
private Set <MethodNode > checkMethodCall (@ Nonnull final ClassContext context , @ Nonnull final ClassNode classNode ,
152
152
@ Nonnull final MethodNode methodToIterate , @ Nonnull final MethodNode saveRestoreMethod ,
@@ -156,12 +156,7 @@ private Set<MethodNode> checkMethodCall(@Nonnull final ClassContext context, @No
156
156
if (methodToIterate .localVariables != null ) {
157
157
// We are sorting 'methodToIterate.localVariables' because the index of the each item is always
158
158
// a position of the Local Variable Table, but sometimes those index do not match with the position.
159
- Collections .sort (methodToIterate .localVariables , new Comparator <LocalVariableNode >() {
160
- @ Override
161
- public int compare (final LocalVariableNode o1 , final LocalVariableNode o2 ) {
162
- return o1 .index - o2 .index ;
163
- }
164
- });
159
+ Collections .sort (methodToIterate .localVariables , new LocalVariableNodeComparator ());
165
160
}
166
161
167
162
final AbstractInsnNode [] instructions = methodToIterate .instructions .toArray ();
0 commit comments