Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8046817

JDK 8 schemagen tool does not generate xsd files for enum types

XMLWordPrintable

    • b49
    • generic
    • linux_oracle_6.0
    • Verified

        The following source file "BookCategoryType.java" was stripped down from the xjc generated source out of "books.xsd".

        import javax.xml.bind.annotation.XmlEnum;
        import javax.xml.bind.annotation.XmlEnumValue;
        import javax.xml.bind.annotation.XmlType;

        @XmlType(name = "bookCategoryType")
        @XmlEnum
        public enum BookCategoryType {

            @XmlEnumValue("magazine")
            MAGAZINE("magazine");

            private final String value;
            BookCategoryType(String v) {
                value = v;
            }
        }

        When running the JDK 8 schemagen tool using the following command:
        schemagen BookCategoryType.java

        no "schema1.xsd" file is generated.

        The schemagen tool of JDK 7 generates this file as expected.

        The JDK 8 version used is:
        java version "1.8.0_05"
        Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
        Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

        on a Oracle Linux Server.

              aefimov Aleksej Efimov
              msusko Mark Susko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: