Fri, 04 Oct 2013 14:46:46 -0700
6525408: DiagnosticListener should receive MANDATORY_WARNING in standard compiler mode
Reviewed-by: darcy
1.1 --- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Fri Oct 04 13:59:13 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Fri Oct 04 14:46:46 2013 -0700 1.3 @@ -741,7 +741,7 @@ 1.4 out.close(); 1.5 } 1.6 return outFile; 1.7 - } 1.8 + }'' 1.9 } 1.10 1.11 /** Generate code and emit a class file for a given class
2.1 --- a/src/share/classes/javax/tools/Diagnostic.java Fri Oct 04 13:59:13 2013 -0700 2.2 +++ b/src/share/classes/javax/tools/Diagnostic.java Fri Oct 04 14:46:46 2013 -0700 2.3 @@ -1,5 +1,5 @@ 2.4 /* 2.5 - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 2.6 + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. 2.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.8 * 2.9 * This code is free software; you can redistribute it and/or modify it 2.10 @@ -49,6 +49,15 @@ 2.11 2.12 /** 2.13 * Kinds of diagnostics, for example, error or warning. 2.14 + * 2.15 + * The kind of a diagnostic can be used to determine how the 2.16 + * diagnostic should be presented to the user. For example, 2.17 + * errors might be colored red or prefixed with the word "Error", 2.18 + * while warnings might be colored yellow or prefixed with the 2.19 + * word "Warning". There is no requirement that the Kind 2.20 + * should imply any inherent semantic meaning to the message 2.21 + * of the diagnostic: for example, a tool might provide an 2.22 + * option to report all warnings as errors. 2.23 */ 2.24 enum Kind { 2.25 /** 2.26 @@ -63,7 +72,7 @@ 2.27 /** 2.28 * Problem similar to a warning, but is mandated by the tool's 2.29 * specification. For example, the Java™ Language 2.30 - * Specification, 3rd Ed. mandates warnings on certain 2.31 + * Specification mandates warnings on certain 2.32 * unchecked operations and the use of deprecated methods. 2.33 */ 2.34 MANDATORY_WARNING,