Derby
  1. Derby
  2. DERBY-4958

Wrapper types not recognized when resolving procedures with OUT arguments.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Deviation from standard

      Description

      Derby does not recognize the wrapper objects when trying to match Java methods to the signatures of procedures with OUT arguments. For instance, the following procedure declaration

      create procedure proc
      (
      out intCol int
      )
      language java
      parameter style java
      no sql
      external name 'zz.proc'

      is supposed to match both of the following Java signatures:

      public static void proc( int[] arg )

      {...}
      public static void proc( Integer[] arg ) {...}

      However, only the first signature is matched. I will attach a test case which shows this.

      1. zz.java
        2 kB
        Rick Hillegas
      2. derby-4958-01-ab-convertArrayTypesToCellTypes.diff
        5 kB
        Rick Hillegas
      3. derby-4952-01-aa-convertArrayTypesToCellTypes.diff
        0.9 kB
        Rick Hillegas

        Issue Links

          Activity

          Hide
          Rick Hillegas added a comment -

          Attaching zz.java, a test case which demonstrates the problem.

          Show
          Rick Hillegas added a comment - Attaching zz.java, a test case which demonstrates the problem.
          Hide
          Rick Hillegas added a comment -

          Linking to DERBY-3652, the master issue for an earlier attempt to clean up Derby's signature resolution.

          Show
          Rick Hillegas added a comment - Linking to DERBY-3652 , the master issue for an earlier attempt to clean up Derby's signature resolution.
          Hide
          Rick Hillegas added a comment -

          Linking to DERBY-4869 because I stumbled on this problem while writing a regression test for a patch for that issue.

          Show
          Rick Hillegas added a comment - Linking to DERBY-4869 because I stumbled on this problem while writing a regression test for a patch for that issue.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-4952-01-aa-convertArrayTypesToCellTypes.diff. This is a first attempt to fix this problem. If this works, I will add regression tests in a follow-on patch. Running the existing tests now.

          This patch makes the ClassInspector compare cell types rather than array types when checking to see if a wrapper type is compatible with a primitive type according to the ANSI rules.

          Touches the following file:

          M java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java

          Show
          Rick Hillegas added a comment - Attaching derby-4952-01-aa-convertArrayTypesToCellTypes.diff. This is a first attempt to fix this problem. If this works, I will add regression tests in a follow-on patch. Running the existing tests now. This patch makes the ClassInspector compare cell types rather than array types when checking to see if a wrapper type is compatible with a primitive type according to the ANSI rules. Touches the following file: M java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
          Hide
          Rick Hillegas added a comment -

          The existing tests passed cleanly me for me except for the testPing Heisenbug.

          Show
          Rick Hillegas added a comment - The existing tests passed cleanly me for me except for the testPing Heisenbug.
          Hide
          Rick Hillegas added a comment -

          Attaching second rev of the patch, derby-4958-01-ab-convertArrayTypesToCellTypes.diff. This rev includes a regression test for the change. Committed at subversion revision 1055181.

          Touches the following files:

          M java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignatures.java

          Show
          Rick Hillegas added a comment - Attaching second rev of the patch, derby-4958-01-ab-convertArrayTypesToCellTypes.diff. This rev includes a regression test for the change. Committed at subversion revision 1055181. Touches the following files: M java/engine/org/apache/derby/iapi/services/loader/ClassInspector.java M java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignaturesTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/lang/AnsiSignatures.java

            People

            • Assignee:
              Rick Hillegas
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development