6972747: CheckExamples fail when assertions are enabled
authormcimadamore
Thu, 29 Jul 2010 15:57:18 +0100
changeset 6155 214f78bb8006
parent 6154 c1b0c6641b92
child 6156 e15c221efaac
6972747: CheckExamples fail when assertions are enabled Summary: The test calls the wrong version of JavacMessage constructor Reviewed-by: jjg
langtools/test/tools/javac/diags/Example.java
--- a/langtools/test/tools/javac/diags/Example.java	Thu Jul 29 15:56:25 2010 +0100
+++ b/langtools/test/tools/javac/diags/Example.java	Thu Jul 29 15:57:18 2010 +0100
@@ -502,11 +502,16 @@
         }
 
         static class MessageTracker extends JavacMessages {
-            static void preRegister(Context c, final Set<String> keys) {
+
+            MessageTracker(Context context) {
+                super(context);
+            }
+
+            static void preRegister(final Context c, final Set<String> keys) {
                 if (keys != null) {
                     c.put(JavacMessages.messagesKey, new Context.Factory<JavacMessages>() {
                         public JavacMessages make() {
-                            return new MessageTracker() {
+                            return new MessageTracker(c) {
                                 @Override
                                 public String getLocalizedString(Locale l, String key, Object... args) {
                                     keys.add(key);