castor
  1. castor
  2. CASTOR-721

SourceGenerator ignores "final" attribute on <java-class/> in binding file.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.5.3
    • Fix Version/s: 1.0.2
    • Component/s: XML code generator
    • Labels:
      None
    • Environment:
      Operating System: Windows 2000
      Platform: PC
    • Bugzilla Id:
      1579
    • Number of attachments :
      3

      Description

      SourceGenerator ignores "final" attribute on <java-class/> in binding file.

      Test case details:
      1) SourceGenerator command: java cp .;castor-0.9.5.3.jar;castor-0.9.5.3
      xml.jar;xml-apis.jar;xercesImpl.jar org.exolab.castor.builder.SourceGenerator -
      i "castor-bug.xsd" -types j2 -nomarshall -binding-file castor-bug-binding.xml

      Attachments to be added:
      -Example schema
      -Example binding file.

      1. castor-bug-1579.xsd
        0.4 kB
        derek.sayeau
      2. castor-bug-1579-binding.xml
        0.7 kB
        derek.sayeau
      3. patch.c721.20060726.txt
        3 kB
        Werner Guttmann

        Activity

        Hide
        derek.sayeau added a comment -

        Created an attachment (id=429)
        Example binding file.

        Show
        derek.sayeau added a comment - Created an attachment (id=429) Example binding file.
        Hide
        derek.sayeau added a comment -

        Created an attachment (id=430)
        Example schema.

        Show
        derek.sayeau added a comment - Created an attachment (id=430) Example schema.
        Hide
        Keith Visco added a comment -

        Arnaud can you look into this?

        Show
        Keith Visco added a comment - Arnaud can you look into this?
        Hide
        Thomas Zooman added a comment -

        the problem is in JClass.java

        JModifiers modifiers = getModifiers();
        if (modifiers.isPrivate())

        { buffer.append("private "); }

        else if (modifiers.isPublic())

        { buffer.append("public "); }

        if (modifiers.isAbstract())

        { buffer.append("abstract "); }

        append final and static are missing.

        if ( modifiers.isFinal() && modifiers.isAbstract() == false )

        { buff.append("final "); }
        Show
        Thomas Zooman added a comment - the problem is in JClass.java JModifiers modifiers = getModifiers(); if (modifiers.isPrivate()) { buffer.append("private "); } else if (modifiers.isPublic()) { buffer.append("public "); } if (modifiers.isAbstract()) { buffer.append("abstract "); } append final and static are missing. if ( modifiers.isFinal() && modifiers.isAbstract() == false ) { buff.append("final "); }
        Hide
        Thomas Zooman added a comment -

        sorry, static is not allow in outter class

        Show
        Thomas Zooman added a comment - sorry, static is not allow in outter class

          People

          • Assignee:
            Werner Guttmann
            Reporter:
            derek.sayeau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: