changeset 4817:43a83431f19d

8176743: tools/javac/modules/MOptionTest.java test fails on Mac Summary: Correctly preferring classfiles over source files when timestamps match. Reviewed-by: jjg
author jlahoda
date Wed, 15 Mar 2017 15:46:43 +0100
parents 147a9390f8e2
children 11ccc79e4126
files src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java test/tools/javac/modules/MOptionTest.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java	Wed Mar 15 06:30:33 2017 -0700
+++ b/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/test/tools/javac/modules/MOptionTest.java	Wed Mar 15 06:30:33 2017 -0700
+++ b/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