changeset 2971:2640b9d2f527

weaken error to warning until javac supports -Xoverride in some form
author jjg
date Fri, 03 Apr 2015 18:24:25 -0700
parents 410b10153087
children cf35af6e6fde
files src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties test/tools/javac/modules/PackageConflictTest.java
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Fri Apr 03 17:00:42 2015 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java	Fri Apr 03 18:24:25 2015 -0700
@@ -329,7 +329,7 @@
                 if (tree.packge.modle == null) {
                     tree.packge.modle = tree.modle;
                 } else if (tree.packge.modle != tree.modle) {
-                    log.error(pd, "package.in.other.module", tree.packge.modle);
+                    log.warning(pd, "package.in.other.module", tree.packge.modle);
                 }
             }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Apr 03 17:00:42 2015 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties	Fri Apr 03 18:24:25 2015 -0700
@@ -2658,7 +2658,7 @@
     unexpected input after module declaration
 
 # 0: symbol
-compiler.err.package.in.other.module=\
+compiler.warn.package.in.other.module=\
     package exists in another module: {0}
 
 # 0: symbol
--- a/test/tools/javac/modules/PackageConflictTest.java	Fri Apr 03 17:00:42 2015 -0700
+++ b/test/tools/javac/modules/PackageConflictTest.java	Fri Apr 03 18:24:25 2015 -0700
@@ -52,11 +52,11 @@
                 .options("-XDrawDiagnostics")
                 .outdir(classes.toString())
                 .files(findJavaFiles(src))
-                .run(ToolBox.Expect.FAIL)
+                .run(ToolBox.Expect.SUCCESS)
                 .writeAll()
                 .getOutput(ToolBox.OutputKind.DIRECT);
 
-        if (!log.contains("MyList.java:1:1: compiler.err.package.in.other.module: java.base"))
+        if (!log.contains("MyList.java:1:1: compiler.warn.package.in.other.module: java.base"))
             throw new Exception("expected output not found");
     }
 }