2929import com .sun .btrace .annotations .Where ;
3030import com .sun .btrace .org .objectweb .asm .AnnotationVisitor ;
3131import com .sun .btrace .org .objectweb .asm .Opcodes ;
32- import com .sun .btrace .org .objectweb .asm .Type ;
3332import static com .sun .btrace .runtime .Constants .*;
3433
3534import com .sun .btrace .org .objectweb .asm .tree .MethodNode ;
36- import static com .sun .btrace .runtime .Verifier .BTRACE_DURATION_DESC ;
37- import static com .sun .btrace .runtime .Verifier .BTRACE_RETURN_DESC ;
38- import static com .sun .btrace .runtime .Verifier .BTRACE_SELF_DESC ;
39- import static com .sun .btrace .runtime .Verifier .BTRACE_TARGETINSTANCE_DESC ;
40- import static com .sun .btrace .runtime .Verifier .BTRACE_TARGETMETHOD_DESC ;
4135import java .util .Comparator ;
4236import java .util .List ;
4337import java .util .Set ;
@@ -198,7 +192,7 @@ public void visit(String name, Object value) {
198192 }
199193 }
200194 };
201- } else if (type .equals (SAMPLER_DESC )) {
195+ } else if (type .equals (SAMPLED_DESC )) {
202196 if (om != null ) {
203197 om .setSamplerKind (Sampled .Sampler .Adaptive );
204198 return new AnnotationVisitor (Opcodes .ASM5 , av ) {
@@ -217,7 +211,7 @@ public void visit(String name, Object value) {
217211 public void visitEnum (String name , String desc , String value ) {
218212 super .visitEnum (name , desc , value );
219213
220- if (name .equals ("kind" ) && desc .equals (Type . getDescriptor ( Sampled . Sampler . class ) )) {
214+ if (name .equals ("kind" ) && desc .equals (SAMPLER_DESC )) {
221215 om .setSamplerKind (Sampled .Sampler .valueOf (value ));
222216 }
223217 }
@@ -310,7 +304,7 @@ OnProbe getOnProbe() {
310304
311305 private AnnotationVisitor setSpecialParameters (final SpecialParameterHolder ph , final String desc , int parameter , AnnotationVisitor av ) {
312306 // for OnProbe the 'loc' variable will be null; we will need to verfiy the placement later on
313- if (desc .equals (BTRACE_SELF_DESC )) {
307+ if (desc .equals (SELF_DESC )) {
314308 ph .setSelfParameter (parameter );
315309 } else if (desc .equals (BTRACE_PROBECLASSNAME_DESC )) {
316310 ph .setClassNameParameter (parameter );
@@ -326,9 +320,9 @@ public void visit(String name, Object val) {
326320 }
327321
328322 };
329- } else if (desc .equals (BTRACE_RETURN_DESC )) {
323+ } else if (desc .equals (RETURN_DESC )) {
330324 ph .setReturnParameter (parameter );
331- } else if (desc .equals (BTRACE_TARGETMETHOD_DESC )) {
325+ } else if (desc .equals (TARGETMETHOD_DESC )) {
332326 ph .setTargetMethodOrFieldParameter (parameter );
333327
334328 av = new AnnotationVisitor (Opcodes .ASM5 , av ) {
@@ -341,9 +335,9 @@ public void visit(String name, Object val) {
341335 }
342336
343337 };
344- } else if (desc .equals (BTRACE_TARGETINSTANCE_DESC )) {
338+ } else if (desc .equals (TARGETINSTANCE_DESC )) {
345339 ph .setTargetInstanceParameter (parameter );
346- } else if (desc .equals (BTRACE_DURATION_DESC )) {
340+ } else if (desc .equals (DURATION_DESC )) {
347341 ph .setDurationParameter (parameter );
348342 }
349343 return av ;
@@ -358,7 +352,7 @@ private void verifySpecialParameters(OnMethod om) {
358352 (loc .getValue () == Kind .FIELD_GET && loc .getWhere () == Where .AFTER ) ||
359353 (loc .getValue () == Kind .NEW && loc .getWhere () == Where .AFTER ) ||
360354 (loc .getValue () == Kind .NEWARRAY && loc .getWhere () == Where .AFTER ))) {
361- Verifier .reportError ("return.desc.invalid" , om .getTargetName () + om .getTargetDescriptor () + "(" + om .getReturnParameter () + ")" );;
355+ Verifier .reportError ("return.desc.invalid" , om .getTargetName () + om .getTargetDescriptor () + "(" + om .getReturnParameter () + ")" );
362356 }
363357 }
364358 if (om .getTargetMethodOrFieldParameter () != -1 ) {
0 commit comments