changeset 2336:35fca9f10e60

Improve error messages.
author wmdietl
date Wed, 20 Mar 2013 14:59:56 +0100
parents e717501c1f77
children abddf1820015
files src/share/classes/com/sun/tools/javac/resources/compiler.properties
diffstat 1 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Mar 20 14:59:34 2013 +0100
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Wed Mar 20 14:59:56 2013 +0100
@@ -2176,8 +2176,11 @@
     as of release 8, ''this'' is allowed as the parameter name for the receiver type only, which has to be the first parameter
 
 # TODO 308: make a better error message
-compiler.err.receiver.parameter.not.applicable=\
-    receiver parameter not applicable
+compiler.err.receiver.parameter.not.applicable.static=\
+    receiver parameter not applicable for static method: {0}
+
+compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=\
+    receiver parameter not applicable for constructor of top-level class: {0}
 
 # TODO 308: make a better error message
 compiler.err.cant.annotate.static.class=\
@@ -2187,7 +2190,19 @@
     nested type cannot be annotated
 
 compiler.err.incorrect.receiver.type=\
-    the receiver type does not match the enclosing class type
+    the receiver type does not match the enclosing class type\n\
+    required: {0}\n\
+    found: {1}
+
+compiler.err.incorrect.constructor.receiver.type=\
+    the receiver type does not match the enclosing outer class type\n\
+    required: {0}\n\
+    found: {1}
+
+compiler.err.receiver.parameter.wrong.name=\
+    the receiver parameter has a wrong name\n\
+    required: {0}\n\
+    found: {1}
 
 compiler.err.no.annotations.on.dot.class=\
     no annotations are allowed in the type of a class literal