8176743: tools/javac/modules/MOptionTest.java test fails on Mac
authorjlahoda
Wed, 15 Mar 2017 15:46:43 +0100
changeset 44294 724ad5bc5e1b
parent 44293 2f47b2c16612
child 44295 f147ed497558
8176743: tools/javac/modules/MOptionTest.java test fails on Mac Summary: Correctly preferring classfiles over source files when timestamps match. Reviewed-by: jjg
langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java
langtools/test/tools/javac/modules/MOptionTest.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java	Wed Mar 15 06:30:33 2017 -0700
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java	Wed Mar 15 15:46:43 2017 +0100
@@ -355,7 +355,7 @@
 
             if (fo == null) {
                 fo = getModuleInfoFromLocation(msym.classLocation, Kind.CLASS);
-                fo = preferredFileObject(fo, getModuleInfoFromLocation(msym.sourceLocation, Kind.SOURCE));
+                fo = preferredFileObject(getModuleInfoFromLocation(msym.sourceLocation, Kind.SOURCE), fo);
             }
 
             if (fo == null) {
--- a/langtools/test/tools/javac/modules/MOptionTest.java	Wed Mar 15 06:30:33 2017 -0700
+++ b/langtools/test/tools/javac/modules/MOptionTest.java	Wed Mar 15 15:46:43 2017 +0100
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 8146946
+ * @bug 8146946 8176743
  * @summary implement javac -m option
  * @library /tools/lib
  * @modules