castor
  1. castor
  2. CASTOR-1477

SourceCodeGenerator ignores -nomarshall, -testable options (Regression bug)

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.0.2
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Linux, JDK 1.4, Castor 1.0
    • Number of attachments :
      2

      Description

      Versions previous to 1.0 final (all milestone releases) do not have this problem.

      With versions 1.0+, all SourceGenerator options that depend on the sourceFactory being set (not null) are ignored.

      The setters for certain options do null checks on the sourceFactory, which doesn't seem to get set until generateSource() is later called.

      1. patch.c1477.20060802.txt
        7 kB
        Werner Guttmann
      2. patch-C1477-20060725.txt
        5 kB
        Ralf Joachim

        Issue Links

          Activity

          Hide
          Werner Guttmann added a comment -

          Jason, can you please attach a small JUnit test case that highlights your problem ? The better I can replay your problem (with as little work on my side as possible), the faster I can provide a possible reply to you.

          Show
          Werner Guttmann added a comment - Jason, can you please attach a small JUnit test case that highlights your problem ? The better I can replay your problem (with as little work on my side as possible), the faster I can provide a possible reply to you.
          Hide
          Werner Guttmann added a comment -

          I am not 100% sure, but it may be that CASTOR-1477 is related to the patch provided above.

          Show
          Werner Guttmann added a comment - I am not 100% sure, but it may be that CASTOR-1477 is related to the patch provided above.
          Hide
          Werner Guttmann added a comment -

          It looks like CASTOR-1346 has introduced a regression bug that prevents command line parameters from being recognized properly.

          Show
          Werner Guttmann added a comment - It looks like CASTOR-1346 has introduced a regression bug that prevents command line parameters from being recognized properly.
          Hide
          Ralf Joachim added a comment -

          Attached patch should now again pass all commandline parameters to SourceFactory except of "testable".

          I commented out line 329 of SourceGenerator which would pass the "testable" parameter to SourceFactory as this would cause 10 failing tests of CTF. It seams that to me that compilations of the generated classes fail if "testable" is enabled at CTF tests. I only see 2 reasons how this could happen:

          1. "testable" has never been passed offer to SourceFactory
          2. another patch has caused that the methods generated with "testable" enabled do not compile any more

          If anyone else is able to resolve this problem we are able to continue and resolve this issue.

          Show
          Ralf Joachim added a comment - Attached patch should now again pass all commandline parameters to SourceFactory except of "testable". I commented out line 329 of SourceGenerator which would pass the "testable" parameter to SourceFactory as this would cause 10 failing tests of CTF. It seams that to me that compilations of the generated classes fail if "testable" is enabled at CTF tests. I only see 2 reasons how this could happen: 1. "testable" has never been passed offer to SourceFactory 2. another patch has caused that the methods generated with "testable" enabled do not compile any more If anyone else is able to resolve this problem we are able to continue and resolve this issue.
          Hide
          Werner Guttmann added a comment -

          Improved patch, dealing with an 'oddity' as introduced by the patch that added support for Java 5 generics. Speaking of which, after running the CTF test suites against this accumulative patch, I noted that the regression test suite finishes with 3 errors only .. .

          Show
          Werner Guttmann added a comment - Improved patch, dealing with an 'oddity' as introduced by the patch that added support for Java 5 generics. Speaking of which, after running the CTF test suites against this accumulative patch, I noted that the regression test suite finishes with 3 errors only .. .

            People

            • Assignee:
              Werner Guttmann
              Reporter:
              Jason Boutwell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: