changeset 4935:a543a82a77b7

Merge
author mchung
date Thu, 18 May 2017 14:18:03 -0700
parents aae59039c1f5 69ae34a97515
children 88aaba14239f
files .hgtags make/gendata/Gendata-jdk.compiler.gmk src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractModuleIndexWriter.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexFrameWriter.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModulePackageIndexFrameWriter.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css test/jdk/javadoc/doclet/testModules/TestModules.java test/tools/javac/options/release/ReleaseOptionClashes.java
diffstat 3 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu May 18 14:54:56 2017 +0000
+++ b/.hgtags	Thu May 18 14:18:03 2017 -0700
@@ -392,6 +392,7 @@
 76389430a13e82a9321cdc085216f6bff526e316 jdk-9+147
 586c93260d3b2f91a055b96118b141c05841694f jdk-9+148
 4d4cd7cd731c1952d7330ea5bcfda8bd26820fa5 jdk-9+149
+ff59f4589b3ed6338a5c8298e982cfcbccd73f55 jpms-edr
 e5a42ddaf633fde14b983f740ae0e7e490741fd1 jdk-9+150
 4f348bd05341581df84ff1510d5b3a9b5b488367 jdk-9+151
 5b6f12de6f9167a582fa2c6ac54e69c591b09e68 jdk-9+152
@@ -403,10 +404,12 @@
 4eb737a8d439f49a197e8000de26c6580cb4d57b jdk-9+158
 39449d2a6398fee779630f041c55c0466f5fd2c0 jdk-9+159
 0f4fef68d2d84ad78b3aaf6eab2c07873aedf971 jdk-9+160
+a1af3e79776728076a941e2ab777aba83ff1b875 jpms-pr
 2340259b31554a3761e9909953c8ab8ef124ac07 jdk-9+161
 440c45c2e8cee78f6883fa6f2505a781505f323c jdk-9+162
 24582dd2649a155876de89273975ebe1adb5f18c jdk-9+163
 c7f3df19667b093538c6eecb73dcb3fb531706b4 jdk-9+164
+ff80ebf4ace699497bf9c3688e34e0c42d07ca13 jpms-pr2
 98108b7d4cb6078773e2d27ad8471dc25d4d6124 jdk-9+165
 2a8b403a623320479705aad04ed8d78396661eb7 jdk-9+166
 f260f1a2acf616509a4ee5a29bc7f2acca3853e3 jdk-9+167
--- a/.jcheck/conf	Thu May 18 14:54:56 2017 +0000
+++ b/.jcheck/conf	Thu May 18 14:18:03 2017 -0700
@@ -1,1 +1,4 @@
 project=jdk9
+comments=lax
+tags=lax
+bugids=dup
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Thu May 18 14:54:56 2017 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java	Thu May 18 14:18:03 2017 -0700
@@ -29,6 +29,7 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.UncheckedIOException;
 import java.net.URI;
 import java.net.URL;
@@ -65,6 +66,8 @@
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
 
 import javax.lang.model.SourceVersion;
 import javax.tools.JavaFileManager;
@@ -1341,6 +1344,17 @@
                             String moduleName = readModuleName(moduleInfoClass);
                             return new Pair<>(moduleName, p);
                         }
+                        Path mf = fs.getPath("META-INF/MANIFEST.MF");
+                        if (Files.exists(mf)) {
+                            try (InputStream in = Files.newInputStream(mf)) {
+                                Manifest man = new Manifest(in);
+                                Attributes attrs = man.getMainAttributes();
+                                if (attrs != null) {
+                                    String moduleName = attrs.getValue(new Attributes.Name("Automatic-Module-Name"));
+                                    if (moduleName != null) return new Pair<>(moduleName, p);
+                                }
+                            }
+                        }
                     } catch (ModuleNameReader.BadClassFile e) {
                         log.error(Errors.LocnBadModuleInfo(p));
                         return null;