JDK-8178014 : CryptoPolicyParser's API comment contains < and > characters
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-04-03
  • Updated: 2017-05-12
  • Resolved: 2017-05-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b169Fixed
Related Reports
Relates :  
Description
The following:
http://hg.openjdk.java.net/jdk9/dev/jdk/file/6dea581453d7/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java#l49
Has open < and > characters, for normal doc production this is not an issue as this class in package private, 
however for folks trying to build with -package or -private javadoc options, this issue will likely to cause issues.

The fix is simple either replace those characters with HTML entities 
or surround that example snippet with {@code ......}

A possible patch
diff --git a/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java b/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java
--- a/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java
+++ b/src/java.base/share/classes/javax/crypto/CryptoPolicyParser.java
@@ -46,10 +46,12 @@
  *
  * The format of a permission entry in the jurisdiction policy file is:
  *
+ * {@code
  *   permission <crypto permission class name>[, <algorithm name>
  *              [[, <exemption mechanism name>][, <maxKeySize>
  *              [, <AlgrithomParameterSpec class name>, <parameters
  *              for constructing an AlgrithomParameterSpec object>]]]];
+ * }
  *
  * @author Sharon Liu
  *


Comments
Also: 1. found another error in a support method in CipherInputStream. Current documentation isn't good javadoc ("Private convenience function."), so removing the javadoc trigger. 2. In CryptoPermission, there was some empty <p> that should have been </li>, so corrected those. 3. Lastly, the <a> 'name' attribute is no longer supported in HTML5. So doing a trivial name->id rename to HTML5 cleanup the XML DSig docs.
01-05-2017

Suggested fix loses formatting. Need to add <pre></pre>
29-04-2017