Mercurial > hg > openjdk > lambda > langtools
changeset 2505:515d54c1b063
6525408: DiagnosticListener should receive MANDATORY_WARNING in standard compiler mode
Reviewed-by: darcy
author | jjg |
---|---|
date | Fri, 04 Oct 2013 14:46:46 -0700 |
parents | 2fa6ced325cc |
children | 3e3c321710be |
files | src/share/classes/com/sun/tools/javac/main/JavaCompiler.java src/share/classes/javax/tools/Diagnostic.java |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Fri Oct 04 13:59:13 2013 -0700 +++ b/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/src/share/classes/javax/tools/Diagnostic.java Fri Oct 04 13:59:13 2013 -0700 +++ b/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,