Tuscany
  1. Tuscany
  2. TUSCANY-257

recently added file Interface2JavaGenerator.java is not compatible with JDK 1.4

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Java-SDO-1.1
    • Component/s: Java SDO Tools
    • Labels:
      None
    • Environment:
      all
    • Patch Info:
      Patch Available

      Description

      Interface2JavaGenerator.java uses java.lang.reflect.ParameterizedType and java.lang.reflect.Type that were added in Java 5 for generics. It appears that the portion of Interface2JavaGenerator that uses ParameterizedType and Type is not needed for Java 1.4 classes.

      1. 257.patch
        61 kB
        Amita Vadhavkar
      2. newFiles.jar
        11 kB
        Paul Golick
      3. patchInterface2JavaGenerator.txt
        2 kB
        Paul Golick
      4. patchUpdated.txt
        0.3 kB
        Paul Golick

        Activity

        ant elder made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        ant elder added a comment -

        Closing because this has been in RESOLVED state for over one year, if it turns out to not be fixed please reopen.

        Show
        ant elder added a comment - Closing because this has been in RESOLVED state for over one year, if it turns out to not be fixed please reopen.
        Amita Vadhavkar made changes -
        Fix Version/s Java-SDO-1.1 [ 12312995 ]
        Fix Version/s Java-SDO-Next [ 12312262 ]
        Amita Vadhavkar made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Amita Vadhavkar added a comment -

        resolved at rev 620782

        Show
        Amita Vadhavkar added a comment - resolved at rev 620782
        Hide
        Kelvin Goodson added a comment -

        Thanks Amita, I took a scan of the patch file and it appears good. The only thing I spotted is that we need a new java_1_4 maven profile that does not include the new project.

        Show
        Kelvin Goodson added a comment - Thanks Amita, I took a scan of the patch file and it appears good. The only thing I spotted is that we need a new java_1_4 maven profile that does not include the new project.
        Amita Vadhavkar made changes -
        Attachment 257.patch [ 12375220 ]
        Hide
        Amita Vadhavkar added a comment -

        have used Paul's work and created 257.patch. please review

        Show
        Amita Vadhavkar added a comment - have used Paul's work and created 257.patch. please review
        Kelvin Goodson made changes -
        Fix Version/s Java-SDO-1.0 [ 12312521 ]
        Fix Version/s Java-SDO-Next [ 12312262 ]
        Kelvin Goodson made changes -
        Fix Version/s Java-SDO-1.0 [ 12312521 ]
        Fix Version/s Java-SDO-Next [ 12312262 ]
        Kelvin Goodson made changes -
        Patch Info [Patch Available]
        ant elder made changes -
        Fix Version/s Java-Mx [ 12311031 ]
        Fix Version/s Java-SDO-Mx [ 12312262 ]
        Jean-Sebastien Delfino made changes -
        Affects Version/s Java-Mx [ 12311031 ]
        Fix Version/s Java-Mx [ 12311031 ]
        Fix Version/s Java-M1 [ 12311030 ]
        Paul Golick made changes -
        Attachment patchUpdated.txt [ 12326401 ]
        Attachment newFiles.jar [ 12326400 ]
        Hide
        Paul Golick added a comment -

        attached files mentioned in previous comment.

        Show
        Paul Golick added a comment - attached files mentioned in previous comment.
        Hide
        Paul Golick added a comment -

        As an alternative to the patch I previously suggested:

        The existing Interface2JavaGenerator.java file could be deleted so that it could be added to a new subproject such as one in a new subdirectory "Tuscany\java\sdo\java5tools" as shown by the files in the attached newFiles.jar that is intended to be extracted from "Tuscany\java".
        In combination with the delete of the existing Interface2JavaGenerator.java file and the addition of the new subproject, the current Tuscany\java\sdo\pom.xml file needs to be patched to add the new subproject as shown by the attached patch file, patchUpdated.txt.

        Of course there is nothing significant about the java5tools directory name and a more appropriate name can be used if desired, with corresponding changes in the pom.xml files.

        Show
        Paul Golick added a comment - As an alternative to the patch I previously suggested: The existing Interface2JavaGenerator.java file could be deleted so that it could be added to a new subproject such as one in a new subdirectory "Tuscany\java\sdo\java5tools" as shown by the files in the attached newFiles.jar that is intended to be extracted from "Tuscany\java". In combination with the delete of the existing Interface2JavaGenerator.java file and the addition of the new subproject, the current Tuscany\java\sdo\pom.xml file needs to be patched to add the new subproject as shown by the attached patch file, patchUpdated.txt. Of course there is nothing significant about the java5tools directory name and a more appropriate name can be used if desired, with corresponding changes in the pom.xml files.
        Frank Budinsky made changes -
        Fix Version/s M1 [ 12311030 ]
        Hide
        Frank Budinsky added a comment -

        Without using parameterized types, the whole Interface2JavaGenerator is uninteresting, so we can't take it out. We need to figure out a way to package Java5 dependent features (like this) in a way that makes them optional extensions for Java5 users.

        Any suggestions, or help with that, would be much appreciated.

        Thanks,
        Frank.

        Show
        Frank Budinsky added a comment - Without using parameterized types, the whole Interface2JavaGenerator is uninteresting, so we can't take it out. We need to figure out a way to package Java5 dependent features (like this) in a way that makes them optional extensions for Java5 users. Any suggestions, or help with that, would be much appreciated. Thanks, Frank.
        Paul Golick made changes -
        Field Original Value New Value
        Attachment patchInterface2JavaGenerator.txt [ 12326178 ]
        Hide
        Paul Golick added a comment -

        The attached patch makes the file compatible with Java 1.4 by removing the code that handled methods with parameterized return types, a new feature of Java 1.5.

        Show
        Paul Golick added a comment - The attached patch makes the file compatible with Java 1.4 by removing the code that handled methods with parameterized return types, a new feature of Java 1.5.
        Paul Golick created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Golick
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development