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

javadoc: using <pre> after @deprecated tag causes warnings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9
    • tools

      Example:

      source code - jdk/src/java.base/share/classes/javax/security/auth/Policy.java

      ...
       * @deprecated as of JDK version 1.4 -- Replaced by java.security.Policy.
       * java.security.Policy has a method:
       * <pre>
       * public PermissionCollection getPermissions
       * (java.security.ProtectionDomain pd)
       *
       * </pre>
       * and ProtectionDomain has a constructor:
       * <pre>
       * public ProtectionDomain
       * (CodeSource cs,
       * PermissionCollection permissions,
       * ClassLoader loader,
       * Principal[] principals)
       * </pre>
       *
       * These two APIs provide callers the means to query the
       * Policy for Principal-based Permission entries.
       *
       * @see java.security.Security security properties
       */
      @Deprecated
      public abstract class Policy {
      ...

      generated html - build/linux-x86_64-normal-server-release/images/docs/api/javax/security/auth/Policy.html

      ...
      <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
      <div class="block"><span class="deprecationComment">as of JDK version 1.4 -- Replaced by java.security.Policy.
                    java.security.Policy has a method:
       <pre>
            public PermissionCollection getPermissions
                (java.security.ProtectionDomain pd)

       </pre>
       and ProtectionDomain has a constructor:
       <pre>
            public ProtectionDomain
                (CodeSource cs,
                 PermissionCollection permissions,
                 ClassLoader loader,
                 Principal[] principals)
       </pre>

       These two APIs provide callers the means to query the
       Policy for Principal-based Permission entries.</span></div>
      </div>
      ...

      So the <span> tag contains nested <pre> causing warnings:

      tidy -e Policy.html

      line 120 column 20 - Warning: missing </span> before <pre>
      line 128 column 2 - Warning: inserting implicit <span>
      line 128 column 2 - Warning: missing </span> before <pre>
      line 137 column 2 - Warning: inserting implicit <span>

            bpatel Bhavesh Patel (Inactive)
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: