Uploaded image for project: 'Commons BCEL'
  1. Commons BCEL
  2. BCEL-170

Type.getArgumentTypes() throws ClassFormatException: Invalid method signature: >;)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.1, 5.2
    • Fix Version/s: None
    • Component/s: Main
    • Labels:
      None

      Description

      for (Attribute attribute : method.getAttributes()) {
          if (attribute instanceof Signature) {
              Signature sig = (Signature) attribute;
              System.out.println("Sig: " + sig.getSignature());
              System.out.println("Ret: " + Type.getReturnType(sig.getSignature()));
              System.out.println("Prm: " + Type.getArgumentTypes(sig.getSignature()));
          }
      }
      
      Input:     public SampleReturn<SampleMethodReturnType> 
                 method
                   (SampleMethodParameter<SampleMethodParameterType> param1) {
                    ...
                 }
      

      Output:

      Sig: (Lnet/sf/sample/SampleMethodParameter<Lnet/sf/sample/SampleMethodParameterType;>;)Lnet/sf/sample/SampleReturn<Lnet/sf/plugfy/sample/SampleMethodReturnType;>;
      
      
      Ret: net.sf.sample.SampleReturn<Lnet.sf.sample.SampleMethodReturnType
      
      
      
      org.apache.bcel.classfile.ClassFormatException: Invalid method signature: >;)Lnet/sf/sample/SampleReturn<Lnet/sf/sample/SampleMethodReturnType;>;
      
      at org.apache.bcel.classfile.Utility.typeOfSignature(Utility.java:978)
      at org.apache.bcel.generic.Type.getType(Type.java:169)
      at org.apache.bcel.generic.Type.getArgumentTypes(Type.java:230)
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nhb_web@nexgo.de Hendrik Brummermann
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: