Thu, 28 May 2015 16:46:23 -0700
Merge
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java Wed May 27 13:20:58 2015 -0700 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java Thu May 28 16:46:23 2015 -0700 1.3 @@ -113,7 +113,7 @@ 1.4 Content captionSpan; 1.5 Content span; 1.6 if (type.isDefaultTab()) { 1.7 - captionSpan = HtmlTree.SPAN(new StringContent(type.text())); 1.8 + captionSpan = HtmlTree.SPAN(configuration.getResource(type.resourceKey())); 1.9 span = HtmlTree.SPAN(type.tabId(), 1.10 HtmlStyle.activeTableTab, captionSpan); 1.11 } else { 1.12 @@ -136,7 +136,7 @@ 1.13 */ 1.14 public Content getMethodTypeLinks(MethodTypes methodType) { 1.15 String jsShow = "javascript:show(" + methodType.value() +");"; 1.16 - HtmlTree link = HtmlTree.A(jsShow, new StringContent(methodType.text())); 1.17 + HtmlTree link = HtmlTree.A(jsShow, configuration.getResource(methodType.resourceKey())); 1.18 return link; 1.19 } 1.20
2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed May 27 13:20:58 2015 -0700 2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Thu May 28 16:46:23 2015 -0700 2.3 @@ -471,10 +471,10 @@ 2.4 for (Map.Entry<String,Integer> entry : typeMap.entrySet()) { 2.5 vars.append(sep); 2.6 sep = ","; 2.7 - vars.append("\""); 2.8 - vars.append(entry.getKey()); 2.9 - vars.append("\":"); 2.10 - vars.append(entry.getValue()); 2.11 + vars.append("\"") 2.12 + .append(entry.getKey()) 2.13 + .append("\":") 2.14 + .append(entry.getValue()); 2.15 } 2.16 vars.append("};").append(DocletConstants.NL); 2.17 sep = ""; 2.18 @@ -482,11 +482,19 @@ 2.19 for (MethodTypes entry : methodTypes) { 2.20 vars.append(sep); 2.21 sep = ","; 2.22 - vars.append(entry.value()).append(":"); 2.23 - vars.append("[").append("\"").append(entry.tabId()); 2.24 - vars.append("\"").append(sep).append("\"").append(entry.text()).append("\"]"); 2.25 + vars.append(entry.value()) 2.26 + .append(":") 2.27 + .append("[") 2.28 + .append("\"") 2.29 + .append(entry.tabId()) 2.30 + .append("\"") 2.31 + .append(sep) 2.32 + .append("\"") 2.33 + .append(configuration.getText(entry.resourceKey())) 2.34 + .append("\"]"); 2.35 } 2.36 - vars.append("};").append(DocletConstants.NL); 2.37 + vars.append("};") 2.38 + .append(DocletConstants.NL); 2.39 addStyles(HtmlStyle.altColor, vars); 2.40 addStyles(HtmlStyle.rowColor, vars); 2.41 addStyles(HtmlStyle.tableTab, vars);
3.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties Wed May 27 13:20:58 2015 -0700 3.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties Thu May 28 16:46:23 2015 -0700 3.3 @@ -150,6 +150,13 @@ 3.4 doclet.Constructors=Constructors 3.5 doclet.methods=methods 3.6 doclet.Methods=Methods 3.7 +doclet.All_Methods=All Methods 3.8 +doclet.Static_Methods=Static Methods 3.9 +doclet.Instance_Methods=Instance Methods 3.10 +doclet.Abstract_Methods=Abstract Methods 3.11 +doclet.Concrete_Methods=Concrete Methods 3.12 +doclet.Default_Methods=Default Methods 3.13 +doclet.Deprecated_Methods=Deprecated Methods 3.14 doclet.annotation_type_optional_members=optional elements 3.15 doclet.Annotation_Type_Optional_Members=Optional Elements 3.16 doclet.annotation_type_required_members=required elements
4.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodTypes.java Wed May 27 13:20:58 2015 -0700 4.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodTypes.java Thu May 28 16:46:23 2015 -0700 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -31,22 +31,22 @@ 4.11 * @author Bhavesh Patel 4.12 */ 4.13 public enum MethodTypes { 4.14 - ALL(0xffff, "All Methods", "t0", true), 4.15 - STATIC(0x1, "Static Methods", "t1", false), 4.16 - INSTANCE(0x2, "Instance Methods", "t2", false), 4.17 - ABSTRACT(0x4, "Abstract Methods", "t3", false), 4.18 - CONCRETE(0x8, "Concrete Methods", "t4", false), 4.19 - DEFAULT(0x10, "Default Methods", "t5", false), 4.20 - DEPRECATED(0x20, "Deprecated Methods", "t6", false); 4.21 + ALL(0xffff, "doclet.All_Methods", "t0", true), 4.22 + STATIC(0x1, "doclet.Static_Methods", "t1", false), 4.23 + INSTANCE(0x2, "doclet.Instance_Methods", "t2", false), 4.24 + ABSTRACT(0x4, "doclet.Abstract_Methods", "t3", false), 4.25 + CONCRETE(0x8, "doclet.Concrete_Methods", "t4", false), 4.26 + DEFAULT(0x10, "doclet.Default_Methods", "t5", false), 4.27 + DEPRECATED(0x20, "doclet.Deprecated_Methods", "t6", false); 4.28 4.29 private final int value; 4.30 - private final String text; 4.31 + private final String resourceKey; 4.32 private final String tabId; 4.33 private final boolean isDefaultTab; 4.34 4.35 - MethodTypes(int v, String t, String id, boolean dt) { 4.36 + MethodTypes(int v, String k, String id, boolean dt) { 4.37 this.value = v; 4.38 - this.text = t; 4.39 + this.resourceKey = k; 4.40 this.tabId = id; 4.41 this.isDefaultTab = dt; 4.42 } 4.43 @@ -55,8 +55,8 @@ 4.44 return value; 4.45 } 4.46 4.47 - public String text() { 4.48 - return text; 4.49 + public String resourceKey() { 4.50 + return resourceKey; 4.51 } 4.52 4.53 public String tabId() {
5.1 --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java Wed May 27 13:20:58 2015 -0700 5.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java Thu May 28 16:46:23 2015 -0700 5.3 @@ -315,11 +315,9 @@ 5.4 for (Type aLowerBound : from.getBounds(InferenceBound.LOWER)) { 5.5 for (Type anotherLowerBound : from.getBounds(InferenceBound.LOWER)) { 5.6 if (aLowerBound != anotherLowerBound && 5.7 - commonSuperWithDiffParameterization(aLowerBound, anotherLowerBound)) { 5.8 - /* self comment check if any lower bound may be and undetVar, 5.9 - * in that case the result of this call may be a false positive. 5.10 - * Should this be restricted to non free types? 5.11 - */ 5.12 + !inferenceContext.free(aLowerBound) && 5.13 + !inferenceContext.free(anotherLowerBound) && 5.14 + commonSuperWithDiffParameterization(aLowerBound, anotherLowerBound)) { 5.15 return generateReferenceToTargetConstraint(tree, from, to, 5.16 resultInfo, inferenceContext); 5.17 }
6.1 --- a/src/share/classes/com/sun/tools/jdeps/Analyzer.java Wed May 27 13:20:58 2015 -0700 6.2 +++ b/src/share/classes/com/sun/tools/jdeps/Analyzer.java Thu May 28 16:46:23 2015 -0700 6.3 @@ -223,7 +223,7 @@ 6.4 Archive targetArchive = findArchive(t); 6.5 if (filter.accepts(o, archive, t, targetArchive)) { 6.6 addDep(o, t); 6.7 - if (!requires.contains(targetArchive)) { 6.8 + if (archive != targetArchive && !requires.contains(targetArchive)) { 6.9 requires.add(targetArchive); 6.10 } 6.11 }
7.1 --- a/src/share/classes/com/sun/tools/jdeps/JdepsTask.java Wed May 27 13:20:58 2015 -0700 7.2 +++ b/src/share/classes/com/sun/tools/jdeps/JdepsTask.java Thu May 28 16:46:23 2015 -0700 7.3 @@ -489,9 +489,11 @@ 7.4 7.5 List<Archive> archives = new ArrayList<>(); 7.6 Deque<String> roots = new LinkedList<>(); 7.7 + List<Path> paths = new ArrayList<>(); 7.8 for (String s : classes) { 7.9 Path p = Paths.get(s); 7.10 if (Files.exists(p)) { 7.11 + paths.add(p); 7.12 archives.add(Archive.getInstance(p)); 7.13 } else { 7.14 if (isValidClassName(s)) { 7.15 @@ -504,7 +506,7 @@ 7.16 sourceLocations.addAll(archives); 7.17 7.18 List<Archive> classpaths = new ArrayList<>(); // for class file lookup 7.19 - classpaths.addAll(getClassPathArchives(options.classpath)); 7.20 + classpaths.addAll(getClassPathArchives(options.classpath, paths)); 7.21 if (options.includePattern != null) { 7.22 archives.addAll(classpaths); 7.23 } 7.24 @@ -545,6 +547,9 @@ 7.25 deque.add(cn); 7.26 } 7.27 a.addClass(d.getOrigin(), d.getTarget()); 7.28 + } else { 7.29 + // ensure that the parsed class is added the archive 7.30 + a.addClass(d.getOrigin()); 7.31 } 7.32 } 7.33 for (String name : a.reader().skippedEntries()) { 7.34 @@ -592,6 +597,9 @@ 7.35 if (!doneClasses.contains(cn) && !deque.contains(cn)) { 7.36 deque.add(cn); 7.37 } 7.38 + } else { 7.39 + // ensure that the parsed class is added the archive 7.40 + a.addClass(d.getOrigin()); 7.41 } 7.42 } 7.43 } 7.44 @@ -743,36 +751,52 @@ 7.45 } 7.46 } 7.47 7.48 - private List<Archive> getClassPathArchives(String paths) throws IOException { 7.49 + /* 7.50 + * Returns the list of Archive specified in cpaths and not included 7.51 + * initialArchives 7.52 + */ 7.53 + private List<Archive> getClassPathArchives(String cpaths, List<Path> initialArchives) 7.54 + throws IOException 7.55 + { 7.56 List<Archive> result = new ArrayList<>(); 7.57 - if (paths.isEmpty()) { 7.58 + if (cpaths.isEmpty()) { 7.59 return result; 7.60 } 7.61 - for (String p : paths.split(File.pathSeparator)) { 7.62 + 7.63 + List<Path> paths = new ArrayList<>(); 7.64 + for (String p : cpaths.split(File.pathSeparator)) { 7.65 if (p.length() > 0) { 7.66 - List<Path> files = new ArrayList<>(); 7.67 // wildcard to parse all JAR files e.g. -classpath dir/* 7.68 int i = p.lastIndexOf(".*"); 7.69 if (i > 0) { 7.70 Path dir = Paths.get(p.substring(0, i)); 7.71 try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, "*.jar")) { 7.72 for (Path entry : stream) { 7.73 - files.add(entry); 7.74 + paths.add(entry); 7.75 } 7.76 } 7.77 } else { 7.78 - files.add(Paths.get(p)); 7.79 - } 7.80 - for (Path f : files) { 7.81 - if (Files.exists(f)) { 7.82 - result.add(Archive.getInstance(f)); 7.83 - } 7.84 + paths.add(Paths.get(p)); 7.85 } 7.86 } 7.87 } 7.88 + for (Path p : paths) { 7.89 + if (Files.exists(p) && !hasSameFile(initialArchives, p)) { 7.90 + result.add(Archive.getInstance(p)); 7.91 + } 7.92 + } 7.93 return result; 7.94 } 7.95 7.96 + private boolean hasSameFile(List<Path> paths, Path p2) throws IOException { 7.97 + for (Path p1 : paths) { 7.98 + if (Files.isSameFile(p1, p2)) { 7.99 + return true; 7.100 + } 7.101 + } 7.102 + return false; 7.103 + } 7.104 + 7.105 class RawOutputFormatter implements Analyzer.Visitor { 7.106 private final PrintWriter writer; 7.107 private String pkg = "";
8.1 --- a/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Wed May 27 13:20:58 2015 -0700 8.2 +++ b/src/share/classes/com/sun/tools/jdeps/PlatformClassPath.java Thu May 28 16:46:23 2015 -0700 8.3 @@ -46,7 +46,7 @@ 8.4 */ 8.5 class PlatformClassPath { 8.6 private static final List<String> NON_PLATFORM_JARFILES = 8.7 - Arrays.asList("alt-rt.jar", "jfxrt.jar", "ant-javafx.jar", "javafx-mx.jar"); 8.8 + Arrays.asList("alt-rt.jar", "ant-javafx.jar", "javafx-mx.jar"); 8.9 private static final List<Archive> javaHomeArchives = init(); 8.10 8.11 static List<Archive> getArchives() { 8.12 @@ -124,6 +124,14 @@ 8.13 */ 8.14 static class JDKArchive extends Archive { 8.15 private static List<String> PROFILE_JARS = Arrays.asList("rt.jar", "jce.jar"); 8.16 + // Workaround: The following packages are not annotated as jdk.Exported 8.17 + private static List<String> EXPORTED_PACKAGES = Arrays.asList( 8.18 + "javax.jnlp", 8.19 + "org.w3c.dom.css", 8.20 + "org.w3c.dom.html", 8.21 + "org.w3c.dom.stylesheets", 8.22 + "org.w3c.dom.xpath" 8.23 + ); 8.24 public static boolean isProfileArchive(Archive archive) { 8.25 if (archive instanceof JDKArchive) { 8.26 return PROFILE_JARS.contains(archive.getName()); 8.27 @@ -155,7 +163,11 @@ 8.28 * Tests if a given package name is exported. 8.29 */ 8.30 public boolean isExportedPackage(String pn) { 8.31 - if (Profile.getProfile(pn) != null || "javax.jnlp".equals(pn)) { 8.32 + if (Profile.getProfile(pn) != null) { 8.33 + return true; 8.34 + } 8.35 + // special case for JavaFX and APIs that are not annotated with @jdk.Exported) 8.36 + if (EXPORTED_PACKAGES.contains(pn) || pn.startsWith("javafx.")) { 8.37 return true; 8.38 } 8.39 return exportedPackages.containsKey(pn) ? exportedPackages.get(pn) : false;
9.1 --- a/test/Makefile Wed May 27 13:20:58 2015 -0700 9.2 +++ b/test/Makefile Thu May 28 16:46:23 2015 -0700 9.3 @@ -21,7 +21,6 @@ 9.4 ifeq ($(OSNAME), SunOS) 9.5 SLASH_JAVA = /java 9.6 PLATFORM = solaris 9.7 - JT_PLATFORM = solaris 9.8 ARCH = $(shell uname -p) 9.9 ifeq ($(ARCH), i386) 9.10 ARCH=i586 9.11 @@ -30,7 +29,6 @@ 9.12 ifeq ($(OSNAME), Linux) 9.13 SLASH_JAVA = /java 9.14 PLATFORM = linux 9.15 - JT_PLATFORM = linux 9.16 ARCH = $(shell uname -m) 9.17 ifeq ($(ARCH), i386) 9.18 ARCH=i586 9.19 @@ -38,7 +36,6 @@ 9.20 endif 9.21 ifeq ($(OSNAME), Darwin) 9.22 PLATFORM = bsd 9.23 - JT_PLATFORM = linux 9.24 ARCH = $(shell uname -m) 9.25 ifeq ($(ARCH), i386) 9.26 ARCH=i586 9.27 @@ -55,7 +52,6 @@ 9.28 9.29 ifeq ($(PLATFORM), windows) 9.30 SLASH_JAVA = J: 9.31 - JT_PLATFORM = win32 9.32 ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),ia64) 9.33 ARCH=ia64 9.34 else 9.35 @@ -93,8 +89,8 @@ 9.36 else 9.37 JTREG_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg 9.38 endif 9.39 -JTREG = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtreg 9.40 -JTDIFF = $(JTREG_HOME)/$(JT_PLATFORM)/bin/jtdiff 9.41 +JTREG = $(JTREG_HOME)/bin/jtreg 9.42 +JTDIFF = $(JTREG_HOME)/bin/jtdiff 9.43 9.44 # Default JCK to run 9.45 ifdef JPRT_JCK_HOME
10.1 --- a/test/tools/javac/MethodParameters/LambdaTest.java Wed May 27 13:20:58 2015 -0700 10.2 +++ b/test/tools/javac/MethodParameters/LambdaTest.java Thu May 28 16:46:23 2015 -0700 10.3 @@ -1,5 +1,5 @@ 10.4 /* 10.5 - * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved. 10.6 + * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. 10.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10.8 * 10.9 * This code is free software; you can redistribute it and/or modify it
11.1 --- a/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java Wed May 27 13:20:58 2015 -0700 11.2 +++ b/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java Thu May 28 16:46:23 2015 -0700 11.3 @@ -1,5 +1,5 @@ 11.4 /* 11.5 - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. 11.6 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 11.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.8 * 11.9 * This code is free software; you can redistribute it and/or modify it
12.1 --- a/test/tools/javac/diags/examples/MrefInferAndExplicitParams.java Wed May 27 13:20:58 2015 -0700 12.2 +++ b/test/tools/javac/diags/examples/MrefInferAndExplicitParams.java Thu May 28 16:46:23 2015 -0700 12.3 @@ -8,7 +8,7 @@ 12.4 * 12.5 * This code is distributed in the hope that it will be useful, but WITHOUT 12.6 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12.7 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12.8 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12.9 * version 2 for more details (a copy is included in the LICENSE file that 12.10 * accompanied this code). 12.11 *
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 13.2 +++ b/test/tools/javac/generics/inference/8055963/T8055963.java Thu May 28 16:46:23 2015 -0700 13.3 @@ -0,0 +1,41 @@ 13.4 +/* 13.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 13.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.7 + * 13.8 + * This code is free software; you can redistribute it and/or modify it 13.9 + * under the terms of the GNU General Public License version 2 only, as 13.10 + * published by the Free Software Foundation. Oracle designates this 13.11 + * particular file as subject to the "Classpath" exception as provided 13.12 + * by Oracle in the LICENSE file that accompanied this code. 13.13 + * 13.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 13.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13.17 + * version 2 for more details (a copy is included in the LICENSE file that 13.18 + * accompanied this code). 13.19 + * 13.20 + * You should have received a copy of the GNU General Public License version 13.21 + * 2 along with this work; if not, write to the Free Software Foundation, 13.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 13.23 + * 13.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 13.25 + * or visit www.oracle.com if you need additional information or have any 13.26 + * questions. 13.27 + */ 13.28 + 13.29 +/** 13.30 + * @test 13.31 + * @bug 8055963 13.32 + * @summary Inference failure with nested invocation 13.33 + * @compile T8055963.java 13.34 + */ 13.35 +class T8055963 { 13.36 + 13.37 + static class C<T> {} 13.38 + 13.39 + <T> T choose(T first, T second) { return null; } 13.40 + 13.41 + void test() { 13.42 + C<String> cs = choose(new C<String>(), new C<>()); 13.43 + } 13.44 +}
14.1 --- a/test/tools/javac/lambda/8023389/T8023389.java Wed May 27 13:20:58 2015 -0700 14.2 +++ b/test/tools/javac/lambda/8023389/T8023389.java Thu May 28 16:46:23 2015 -0700 14.3 @@ -8,7 +8,7 @@ 14.4 * 14.5 * This code is distributed in the hope that it will be useful, but WITHOUT 14.6 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 14.7 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14.8 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14.9 * version 2 for more details (a copy is included in the LICENSE file that 14.10 * accompanied this code). 14.11 *
15.1 --- a/test/tools/javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java Wed May 27 13:20:58 2015 -0700 15.2 +++ b/test/tools/javac/lambda/LambdaExprLeadsToMissingClassFilesTest.java Thu May 28 16:46:23 2015 -0700 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it
16.1 --- a/test/tools/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java Wed May 27 13:20:58 2015 -0700 16.2 +++ b/test/tools/javac/resolve/tests/PrimitiveVsReferenceSamePhase.java Thu May 28 16:46:23 2015 -0700 16.3 @@ -1,5 +1,5 @@ 16.4 /* 16.5 - * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved. 16.6 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 16.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 * 16.9 * This code is free software; you can redistribute it and/or modify it
17.1 --- a/test/tools/jdeps/APIDeps.java Wed May 27 13:20:58 2015 -0700 17.2 +++ b/test/tools/jdeps/APIDeps.java Thu May 28 16:46:23 2015 -0700 17.3 @@ -90,8 +90,9 @@ 17.4 new String[] {"-classpath", testDir.getPath(), "-verbose:class", "-filter:none", "-P"}); 17.5 test(new File(mDir, "Gee.class"), 17.6 new String[] {"g.G", "sun.misc.Lock", "com.sun.tools.classfile.ClassFile", 17.7 - "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree"}, 17.8 - new String[] {testDirBasename, "JDK internal API", "compact3", ""}, 17.9 + "com.sun.management.ThreadMXBean", "com.sun.source.tree.BinaryTree", 17.10 + "org.w3c.dom.css.CSSValue"}, 17.11 + new String[] {testDirBasename, "JDK internal API", "compact2", "compact3", ""}, 17.12 new String[] {"-classpath", testDir.getPath(), "-verbose", "-P"}); 17.13 17.14 // -jdkinternals
18.1 --- a/test/tools/jdeps/Basic.java Wed May 27 13:20:58 2015 -0700 18.2 +++ b/test/tools/jdeps/Basic.java Thu May 28 16:46:23 2015 -0700 18.3 @@ -23,9 +23,9 @@ 18.4 18.5 /* 18.6 * @test 18.7 - * @bug 8003562 8005428 8015912 8027481 8048063 18.8 + * @bug 8003562 8005428 8015912 8027481 8048063 8068937 18.9 * @summary Basic tests for jdeps tool 18.10 - * @build Test p.Foo p.Bar javax.activity.NotCompactProfile 18.11 + * @build Test p.Foo p.Bar p.C p.SubClass q.Gee javax.activity.NotCompactProfile 18.12 * @run main Basic 18.13 */ 18.14 18.15 @@ -111,6 +111,19 @@ 18.16 new String[] {"compact1"}, 18.17 new String[] {"-verbose:package", "-e", "java\\.lang\\..*"}); 18.18 18.19 + // parse p.C, p.SubClass and q.* 18.20 + // p.SubClass have no dependency other than p.C 18.21 + // q.Gee depends on p.SubClass that should be found 18.22 + test(testDir, 18.23 + new String[] {"java.lang", "p"}, 18.24 + new String[] {"compact1", testDir.getName()}, 18.25 + new String[] {"-include", "p.C|p.SubClass|q\\..*"}); 18.26 + test(testDir, 18.27 + new String[] {"java.lang", "p"}, 18.28 + new String[] {"compact1", testDir.getName()}, 18.29 + new String[] {"-classpath", testDir.getPath(), "-include", "p.C|p.SubClass|q\\..*"}); 18.30 + 18.31 + 18.32 // test -classpath and -include options 18.33 test(null, 18.34 new String[] {"java.lang", "java.util", "java.lang.management",
19.1 --- a/test/tools/jdeps/m/Gee.java Wed May 27 13:20:58 2015 -0700 19.2 +++ b/test/tools/jdeps/m/Gee.java Thu May 28 16:46:23 2015 -0700 19.3 @@ -29,4 +29,5 @@ 19.4 public com.sun.tools.classfile.ClassFile cf; // @jdk.Exported(false) 19.5 public com.sun.source.tree.BinaryTree tree; // @jdk.Exported 19.6 public com.sun.management.ThreadMXBean mxbean; // @jdk.Exported on package-info 19.7 + public org.w3c.dom.css.CSSValue value; // special case 19.8 }
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/test/tools/jdeps/p/C.java Thu May 28 16:46:23 2015 -0700 20.3 @@ -0,0 +1,30 @@ 20.4 +/* 20.5 + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 20.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.7 + * 20.8 + * This code is free software; you can redistribute it and/or modify it 20.9 + * under the terms of the GNU General Public License version 2 only, as 20.10 + * published by the Free Software Foundation. 20.11 + * 20.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 20.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 20.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 20.15 + * version 2 for more details (a copy is included in the LICENSE file that 20.16 + * accompanied this code). 20.17 + * 20.18 + * You should have received a copy of the GNU General Public License version 20.19 + * 2 along with this work; if not, write to the Free Software Foundation, 20.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20.21 + * 20.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20.23 + * or visit www.oracle.com if you need additional information or have any 20.24 + * questions. 20.25 + */ 20.26 + 20.27 +package p; 20.28 + 20.29 +public class C { 20.30 + public String name() { 20.31 + return "C"; 20.32 + } 20.33 +}
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 21.2 +++ b/test/tools/jdeps/p/SubClass.java Thu May 28 16:46:23 2015 -0700 21.3 @@ -0,0 +1,28 @@ 21.4 +/* 21.5 + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 21.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 21.7 + * 21.8 + * This code is free software; you can redistribute it and/or modify it 21.9 + * under the terms of the GNU General Public License version 2 only, as 21.10 + * published by the Free Software Foundation. 21.11 + * 21.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 21.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 21.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 21.15 + * version 2 for more details (a copy is included in the LICENSE file that 21.16 + * accompanied this code). 21.17 + * 21.18 + * You should have received a copy of the GNU General Public License version 21.19 + * 2 along with this work; if not, write to the Free Software Foundation, 21.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 21.21 + * 21.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21.23 + * or visit www.oracle.com if you need additional information or have any 21.24 + * questions. 21.25 + */ 21.26 + 21.27 +package p; 21.28 + 21.29 +// SubClass only references types in package p 21.30 +public class SubClass extends C { 21.31 +}
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 22.2 +++ b/test/tools/jdeps/q/Gee.java Thu May 28 16:46:23 2015 -0700 22.3 @@ -0,0 +1,27 @@ 22.4 +/* 22.5 + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 22.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.7 + * 22.8 + * This code is free software; you can redistribute it and/or modify it 22.9 + * under the terms of the GNU General Public License version 2 only, as 22.10 + * published by the Free Software Foundation. 22.11 + * 22.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 22.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 22.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 22.15 + * version 2 for more details (a copy is included in the LICENSE file that 22.16 + * accompanied this code). 22.17 + * 22.18 + * You should have received a copy of the GNU General Public License version 22.19 + * 2 along with this work; if not, write to the Free Software Foundation, 22.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 22.21 + * 22.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22.23 + * or visit www.oracle.com if you need additional information or have any 22.24 + * questions. 22.25 + */ 22.26 + 22.27 +package q; 22.28 + 22.29 +public class Gee extends p.SubClass { 22.30 +}