Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-354

SCOMP generates two methods with same name but different return types when generating java 1.5 code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Version 2.3, Version 2.3.1
    • None
    • Compiler
    • None
    • Windows XP
      Java 1.6.0_03

    Description

      When I run scomp.bat generating Java 1.5 source on the attached XSD I get uncompilable java code. When I run scomp generating Java 1.4 source I don't get the errors.

      Note: The attached XSD is a stripped down version of a publicly available schema from the OGC's (Open Geospatial Consortium) GML version 3.1.1 schemas. You would not have wanted to fix this bug based upon those schemas!

      — Screen grab to Generate Java 1.4
      c:\xmlbeans\bug>scomp -javasource 1.4 xmlbeansbug.xsd
      Time to build schema type system: 0.5 seconds
      Time to generate code: 0.156 seconds
      Time to compile code: 0.875 seconds
      Compiled types to: xmltypes.jar

      — Screen grab to Generate Java 1.5
      c:\xmlbeans\bug>scomp -javasource 1.5 xmlbeansbug.xsd

      Time to build schema type system: 0.516 seconds
      Time to generate code: 0.14 seconds
      c:\Temp\xbean9041.d\src\net\opengis\gml\TestDocument.java:132: getPosList() is already defined in net.opengis.gml.TestDocument.Test
      net.opengis.gml.DirectPositionListType getPosList();
      ^
      c:\Temp\xbean9041.d\src\net\opengis\gml\impl\TestDocumentImpl.java:385: getPosList() is already defined in net.opengis.gml.impl.TestDocumentImpl.TestImpl
      public net.opengis.gml.DirectPositionListType getPosList()
      ^
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      Note: c:\Temp\xbean9041.d\src\net\opengis\gml\impl\TestDocumentImpl.java uses un
      checked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      2 errors

      Attachments

        1. xmlbeanbug.xsd
          2 kB
          Steven Keens

        Activity

          People

            Unassigned Unassigned
            skeens Steven Keens
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: