77import clojure .storm .OpcodesUtils ;
88
99import java .util .Arrays ;
10+ import java .util .stream .Collectors ;
1011
1112public class InstCollectingMethodVisitor extends MethodVisitor {
1213
@@ -171,8 +172,8 @@ public void visitTableSwitchInsn(final int min, final int max, final Label dflt,
171172 Keyword .intern ("instruction" , "op" ), Keyword .intern (null , "table-switch" ),
172173 Keyword .intern (null , "min" ), min ,
173174 Keyword .intern (null , "max" ), max ,
174- Keyword .intern (null , "dflt " ), dflt ,
175- Keyword .intern (null , "labels" ), labels
175+ Keyword .intern (null , "default-label " ), dflt ,
176+ Keyword .intern (null , "labels" ), Arrays . stream ( labels ). map ( Object :: toString ). collect ( Collectors . toList ())
176177 ));
177178 orig .visitTableSwitchInsn (min ,max ,dflt ,labels );
178179 }
@@ -181,9 +182,9 @@ public void visitTableSwitchInsn(final int min, final int max, final Label dflt,
181182 public void visitLookupSwitchInsn (final Label dflt , final int [] keys , final Label [] labels ) {
182183 Emitter .collectEmitInst (RT .map (
183184 Keyword .intern ("instruction" , "op" ), Keyword .intern (null , "lookup-switch" ),
184- Keyword .intern (null , "dflt " ), dflt ,
185+ Keyword .intern (null , "default-label " ), dflt ,
185186 Keyword .intern (null , "keys" ), keys ,
186- Keyword .intern (null , "labels" ), labels
187+ Keyword .intern (null , "labels" ), Arrays . stream ( labels ). map ( Object :: toString ). collect ( Collectors . toList ())
187188 ));
188189 orig .visitLookupSwitchInsn (dflt , keys , labels );
189190 }
@@ -218,8 +219,8 @@ public AnnotationVisitor visitTryCatchAnnotation(final int typeRef, final TypePa
218219 @ Override
219220 public void visitLocalVariable (final String name , final String descriptor , final String signature , final Label start , final Label end , final int index ) {
220221 Emitter .collectEmitVar (RT .map (
221- Keyword .intern (null , "name" ), start . toString () ,
222- Keyword .intern (null , "descriptor" ), end . toString () ,
222+ Keyword .intern (null , "name" ), name ,
223+ Keyword .intern (null , "descriptor" ), descriptor ,
223224 Keyword .intern (null , "signature" ), signature ,
224225 Keyword .intern (null , "start-label" ), start .toString (),
225226 Keyword .intern (null , "end-label" ), end .toString (),
@@ -229,11 +230,7 @@ public void visitLocalVariable(final String name, final String descriptor, final
229230 orig .visitLocalVariable (name ,descriptor ,signature ,start ,end ,index );
230231 }
231232
232- @ Override
233- public AnnotationVisitor visitLocalVariableAnnotation (final int typeRef , final TypePath typePath , final Label [] start , final Label [] end , final int [] index , final String descriptor , final boolean visible ) {
234- return orig .visitLocalVariableAnnotation (typeRef ,typePath , start , end , index ,descriptor ,visible );
235- }
236-
233+
237234 @ Override
238235 public void visitLineNumber (final int line , final Label start ) {
239236 orig .visitLineNumber (line ,start );
0 commit comments