File disable-doclint-by-default.patch of Package java-1_8_0-openjdk.33542

Disable doclint by default

OpenJDK 8 adds and enables doclint by default. This catches issues in
javadoc comments. It is too strict, breaks javadoc compilation and, in
general, breaks the build for old code known to build with previous
versions of OpenJDK.

See: http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
See: https://lists.fedoraproject.org/pipermail/java-devel/2014-February/005150.html

Author: Andrew John Hughes <ahughes@redhat.com>
Author: Emmanuel Bourg <ebourg@apache.org>
--- openjdk/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
+++ openjdk/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java
@@ -811,10 +811,9 @@
             doclintOpts.add(opt == null ? DocLint.XMSGS_OPTION : DocLint.XMSGS_CUSTOM_PREFIX + opt);
         }
 
-        if (doclintOpts.isEmpty()) {
-            doclintOpts.add(DocLint.XMSGS_OPTION);
-        } else if (doclintOpts.size() == 1
-                && doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none")) {
+        if (doclintOpts.isEmpty() ||
+	    (doclintOpts.size() == 1
+	     && doclintOpts.get(0).equals(DocLint.XMSGS_CUSTOM_PREFIX + "none"))) {
             return;
         }
 
--- openjdk/langtools/test/tools/javadoc/doclint/DocLintTest.java
+++ openjdk/langtools/test/tools/javadoc/doclint/DocLintTest.java
@@ -130,12 +130,12 @@
         };
 
         test(Collections.<String>emptyList(),
-                Main.Result.ERROR,
-                EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
+                Main.Result.OK,
+                EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
 
         test(Arrays.asList(rawDiags),
-                Main.Result.ERROR,
-                EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
+                Main.Result.OK,
+                EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
 
         test(Arrays.asList("-Xdoclint:none"),
                 Main.Result.OK,
@@ -158,8 +158,8 @@
                 EnumSet.of(Message.DL_WRN12));
 
         test(Arrays.asList(rawDiags, "-private"),
-                Main.Result.ERROR,
-                EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
+                Main.Result.OK,
+                EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
 
         test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
                 Main.Result.ERROR,
openSUSE Build Service is sponsored by