6525408: DiagnosticListener should receive MANDATORY_WARNING in standard compiler mode
authorjjg
Fri, 04 Oct 2013 14:46:46 -0700
changeset 20616 ed49d47555ee
parent 20615 77f2d47729b0
child 20617 00537d91b0cd
6525408: DiagnosticListener should receive MANDATORY_WARNING in standard compiler mode Reviewed-by: darcy
langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
langtools/src/share/classes/javax/tools/Diagnostic.java
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Fri Oct 04 13:59:13 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Fri Oct 04 14:46:46 2013 -0700
@@ -741,7 +741,7 @@
                 out.close();
             }
             return outFile;
-        }
+        }''
     }
 
     /** Generate code and emit a class file for a given class
--- a/langtools/src/share/classes/javax/tools/Diagnostic.java	Fri Oct 04 13:59:13 2013 -0700
+++ b/langtools/src/share/classes/javax/tools/Diagnostic.java	Fri Oct 04 14:46:46 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,15 @@
 
     /**
      * Kinds of diagnostics, for example, error or warning.
+     *
+     * The kind of a diagnostic can be used to determine how the
+     * diagnostic should be presented to the user. For example,
+     * errors might be colored red or prefixed with the word "Error",
+     * while warnings might be colored yellow or prefixed with the
+     * word "Warning". There is no requirement that the Kind
+     * should imply any inherent semantic meaning to the message
+     * of the diagnostic: for example, a tool might provide an
+     * option to report all warnings as errors.
      */
     enum Kind {
         /**
@@ -63,7 +72,7 @@
         /**
          * Problem similar to a warning, but is mandated by the tool's
          * specification.  For example, the Java™ Language
-         * Specification, 3rd Ed. mandates warnings on certain
+         * Specification mandates warnings on certain
          * unchecked operations and the use of deprecated methods.
          */
         MANDATORY_WARNING,