castor
  1. castor
  2. CASTOR-1470

Java 5 compatible code generatedfrom Castor xml

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.0.2
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Java 5, Windows XP x64 and Fedora Core 5, Eclipse 3.1.0
    • Number of attachments :
      9

      Description

      I have castor XML release 1.0 generating Java 5.0 code. It took me a little over a day to hack the source.

      The main things I ran into were the following:

      1. Added parameterized collections of course.
      2. Added @Override annotations to the generated methods that needed it.
      3. Added @SupressWarnings for "unused" method parameters on the generated methods that needed it.
      4. Added "enum" to the list of reserved keywords and handling for parameterized collections in the JNaming class.

      What I did :

      I checked your SVN repo out at 4:00 pm MST(GMT-7) on June 28, 2006 and overlayed my changes from the 1.0 release version files, adjusting for the commits since the 1.0 files were released.

      I created a patch file containing all of the changes I made and have attached it to this email

      We have to run on Java 5 and have castor XML generating Java 5 code.

      I am very interested in helping/following the progress so I can remove my hacks and use your officially deployed code.

      I have already had to upgrade from 0.9.X to the 1.0 release which was not fun

      1. patch.c1470.20060702.txt
        27 kB
        Werner Guttmann
      2. patch.c1470.20060703.txt
        33 kB
        Werner Guttmann
      3. patch.c1470.20060703.txt
        33 kB
        Werner Guttmann
      4. patch.c1470.20060703-002.txt
        34 kB
        Werner Guttmann
      5. patch.c1470.20060704.txt
        41 kB
        Werner Guttmann
      6. patch.c1470.20060704-002.txt
        45 kB
        Werner Guttmann
      7. patch.c1470.20060707.txt
        42 kB
        Werner Guttmann
      8. patch.c1470.bugs.20060707.txt
        6 kB
        Werner Guttmann
      9. patch.txt
        27 kB
        David Buschman

        Issue Links

          Activity

          Hide
          Werner Guttmann added a comment -

          David, I was actually referring to the test case included in the patch posted by me. This patch includes a JUnit test case, a sample XML Schema, a binding file and castorbuilder.properties. In this properties file you'll find a reference to the new property to be used to turn on Java 5 code generation. Sorry for not making this clearer initially .... ;-(.

          Wrt c), if that's the case, I'd rather omit these changes ....

          Having said that, have you actually been able to run your code generaton routines against a fresh checkout off trunk with the latest patch applied ?

          Show
          Werner Guttmann added a comment - David, I was actually referring to the test case included in the patch posted by me. This patch includes a JUnit test case, a sample XML Schema, a binding file and castorbuilder.properties. In this properties file you'll find a reference to the new property to be used to turn on Java 5 code generation. Sorry for not making this clearer initially .... ;-(. Wrt c), if that's the case, I'd rather omit these changes .... Having said that, have you actually been able to run your code generaton routines against a fresh checkout off trunk with the latest patch applied ?
          Hide
          Werner Guttmann added a comment -

          Ooops, just vcame to realize that there's really no castorbuilder.properties file in src/bugs/xml/c1470 .....

          Show
          Werner Guttmann added a comment - Ooops, just vcame to realize that there's really no castorbuilder.properties file in src/bugs/xml/c1470 .... .
          Hide
          Werner Guttmann added a comment -

          Complete sample code relativ to src/bugs.

          Show
          Werner Guttmann added a comment - Complete sample code relativ to src/bugs.
          Hide
          Werner Guttmann added a comment -

          Final patch (hopefully) .. . Problem is that four test cases fail of the normal CTF test suite.

          Show
          Werner Guttmann added a comment - Final patch (hopefully) .. . Problem is that four test cases fail of the normal CTF test suite.
          Hide
          Werner Guttmann added a comment -

          For whatever reason, both the master test suite as well as the regression test suite finish successfully now. Not that I am sure, bug it looks like I might have been in the wrong project directory when executing the tests ....;-(.

          As such, I'll commti the patch as is, and will ask everybody to open new issues as a result of this patch. In addition, there's quite some refactorings needed to clean up some existing code (that might never have ben used before).

          Show
          Werner Guttmann added a comment - For whatever reason, both the master test suite as well as the regression test suite finish successfully now. Not that I am sure, bug it looks like I might have been in the wrong project directory when executing the tests ....;-(. As such, I'll commti the patch as is, and will ask everybody to open new issues as a result of this patch. In addition, there's quite some refactorings needed to clean up some existing code (that might never have ben used before).

            People

            • Assignee:
              Werner Guttmann
              Reporter:
              David Buschman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: