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

Utility.methodSignature* throw ClassFormatException when converting binary names with generics.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.0
    • 6.10.1
    • Parser
    • None
    • major

    Description

      When I try the following, Utility class throws ClassFormatException:

      String sig = "<T:Ljava/lang/Object;>(Lcom/google/common/io/ByteProcessor<TT;>;)TT;"
      Utility.methodSignatureArgumentTypes(sig, false)
      

      The above signature actually exists in com.google.common.io.ByteSource in Google Guava.

      Utility.methodSignatureReturnType does not throw any exception but its return value does not look valid.

      When I try this:

      String sig = "<T:Ljava/lang/Object;>(Lcom/google/common/io/ByteProcessor<TT;>;)TT;"
      Utility.methodSignaturerReturnType(sig, false)
      

      expected: java.lang.Object
      actual: T

      It seems that org.apache.bcel.generic.Type.java also has the same issue.

      Dongsun.

      Attachments

        1. bcel279.patch
          33 kB
          Mark Roberts

        Activity

          People

            Unassigned Unassigned
            darkrsw Dongsun Kim
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: