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

Invalid verification of the returned value of a method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.0
    • Verifier
    • None
    • major

    Description

      The bytecode generated from the following code produces a verification error:

          public static Object test(){
              return new Object();
          }
      

      Here is the error message:

      Pass 3b, method number 2 ['public static Object test()']:
      VERIFIED_REJECTED
      Constraint violated in method 'public static Object test()':
      Returned type void does not match Method's return type java.lang.Object

      The problem also occurs for all kind of returned value: primitive types (byte, int, etc.), array , null, object, …

      Attachments

        1. BCEL-188-3.zip
          0.5 kB
          Jérôme Leroux
        2. BCEL-188-3.patch
          16 kB
          Jérôme Leroux
        3. BCEL-188-2.patch
          13 kB
          Jérôme Leroux
        4. BCEL-188.patch
          13 kB
          Jérôme Leroux

        Activity

          People

            Unassigned Unassigned
            jejecool Jérôme Leroux
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 4h
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified