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

doclint reports error: "error bad use of '>'"

XMLWordPrintable

    • 8
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0_102"
      Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      When compiling JavaDoc in JDK 8, doclint reports an occurrence of greater than ('>') as an error in the properly escaped statement below:

          <enumeration value="numeric"/>

      This in turn breaks the processing of Java enumeration classes generated by the JAX-B compiler (javax.xml). The workaround requires disabling doclint for all JavaDoc processing, meaning actual HTML errors go uncaught.

      REGRESSION. Last worked in version 7u80

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_102"
      Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Define an xml schema that includes an enumeration
      2) Compile it with the JAX-B compiler to generate Java classes
      3) Attempt to generate JavaDoc for the resulting project

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I expected output from JavaDoc that would probably have included warnings and errors from JavaDoc I wrote that violated the HTML 4 standard.
      ACTUAL -
      "error bad use of '>'"

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      "error bad use of '>'"

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                 xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
                 xmlns:rep = "http://dixbo.manifoldeye.com/xmp"
                 targetNamespace = "http://dixbo.manifoldeye.com/xmp"
                elementFormDefault="qualified"
                 jxb:version="2.0">
        <xs:element name="repository">
           <xs:complexType>
              <xs:sequence>
                    <xs:element name="value" type="rep:DataCategory" />

              </xs:sequence>

           </xs:complexType>
        </xs:element> <!-- end of repository (root element) -->

        <xs:simpleType name="DataCategory">
      <xs:restriction base="xs:string">
                  <xs:enumeration value="numeric" />
      <xs:enumeration value="temporal" />
      <xs:enumeration value="string" />
      </xs:restriction>
        </xs:simpleType>
       
      </xs:schema>
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      I can avoid the problem by disabling doclint, but at the cost of turning off all Java document verification

        1. Test.xsd
          0.8 kB
        2. JDK_8170912.mp4
          11.57 MB

            dkornilov Dmitry Kornilov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: