8176743: tools/javac/modules/MOptionTest.java test fails on Mac
Summary: Correctly preferring classfiles over source files when timestamps match.
Reviewed-by: jjg
--- 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