6972747: CheckExamples fail when assertions are enabled
Summary: The test calls the wrong version of JavacMessage constructor
Reviewed-by: jjg
--- 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);