8171201: Drop java.compact$N aggregator modules

8171202: Rename jdk.crypto.pkcs11 and jdk.pack200 to end with Java letters

Reviewed-by: alanb, erikj
This commit is contained in:
Mandy Chung 2016-12-14 10:51:13 -08:00
parent 5e0f6d2b0c
commit f083b7e656
191 changed files with 162 additions and 251 deletions
jdk
make
src
java.base/share
java.compact1/share/classes
java.compact2/share/classes
java.compact3/share/classes
java.se/share/classes
jdk.crypto.token
share
classes
legal
native/libj2pkcs11
solaris/conf/security
unix/native/libj2pkcs11

@ -30,7 +30,7 @@ include CopyCommon.gmk
ifeq ($(OPENJDK_TARGET_OS), solaris)
SUNPKCS11_CFG_SRC := \
$(JDK_TOPDIR)/src/jdk.crypto.pkcs11/solaris/conf/security/sunpkcs11-solaris.cfg
$(JDK_TOPDIR)/src/jdk.crypto.token/solaris/conf/security/sunpkcs11-solaris.cfg
SUNPKCS11_CFG_DST := $(CONF_DST_DIR)/security/sunpkcs11-solaris.cfg
$(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)

@ -34,9 +34,9 @@ $(eval $(call SetupBuildLauncher, pack200, \
# The order of the object files on the link command line affects the size of the resulting
# binary (at least on linux) which causes the size to differ between old and new build.
UNPACKEXE_SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \
$(JDK_TOPDIR)/src/jdk.pack200/share/native/unpack200
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \
UNPACKEXE_SRC := $(JDK_TOPDIR)/src/jdk.pack/share/native/common-unpack \
$(JDK_TOPDIR)/src/jdk.pack/share/native/unpack200
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/jdk.pack/share/native/common-unpack \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava
@ -97,7 +97,7 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
-D "JDK_FNAME=unpack200.exe" \
-D "JDK_INTERNAL_NAME=unpack200" \
-D "JDK_FTYPE=0x1L", \
MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
MANIFEST := $(JDK_TOPDIR)/src/jdk.pack/windows/native/unpack200/unpack200_proto.exe.manifest, \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))

@ -27,8 +27,8 @@ include LibCommon.gmk
################################################################################
LIBJ2PKCS11_SRC := $(JDK_TOPDIR)/src/jdk.crypto.pkcs11/share/native/libj2pkcs11 \
$(JDK_TOPDIR)/src/jdk.crypto.pkcs11/$(OPENJDK_TARGET_OS_TYPE)/native/libj2pkcs11
LIBJ2PKCS11_SRC := $(JDK_TOPDIR)/src/jdk.crypto.token/share/native/libj2pkcs11 \
$(JDK_TOPDIR)/src/jdk.crypto.token/$(OPENJDK_TARGET_OS_TYPE)/native/libj2pkcs11
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LIBRARY := j2pkcs11, \
@ -37,7 +37,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.pkcs11, \
-I$(SUPPORT_OUTPUTDIR)/headers/jdk.crypto.token, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

@ -30,14 +30,14 @@ include LibCommon.gmk
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/libunpack \
$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack, \
SRC := $(JDK_TOPDIR)/src/jdk.pack/share/native/libunpack \
$(JDK_TOPDIR)/src/jdk.pack/share/native/common-unpack, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL \
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \
-I$(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack \
-I$(JDK_TOPDIR)/src/jdk.pack/share/native/common-unpack \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \

@ -35,9 +35,11 @@ import java.lang.module.ResolvedModule;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
@ -112,6 +114,7 @@ public class GenGraphs {
private static final String REQUIRES_BASE = "color=\"" + GRAY + "\"";
private static final Map<String,Integer> weights = new HashMap<>();
private static final List<Set<String>> ranks = new ArrayList<>();
private static void weight(String s, String t, int w) {
weights.put(s + ":" + t, w);
@ -128,23 +131,37 @@ public class GenGraphs {
static {
int h = 1000;
weight("java.se", "java.compact3", h * 10);
weight("jdk.compact3", "java.compact3", h * 10);
weight("java.compact3", "java.compact2", h * 10);
weight("java.compact2", "java.compact1", h * 10);
weight("java.compact1", "java.logging", h * 10);
weight("java.logging", "java.base", h * 10);
weight("java.se", "java.sql.rowset", h * 10);
weight("java.sql.rowset", "java.sql", h * 10);
weight("java.sql", "java.xml", h * 10);
weight("java.xml", "java.base", h * 10);
ranks.add(Set.of("java.logging", "java.scripting", "java.xml"));
ranks.add(Set.of("java.sql"));
ranks.add(Set.of("java.compiler", "java.instrument"));
ranks.add(Set.of("java.desktop", "java.management"));
ranks.add(Set.of("java.corba", "java.xml.ws"));
ranks.add(Set.of("java.xml.bind", "java.annotations.common"));
}
private void genDotFile(Path dir, String name, Configuration cf) throws IOException {
try (PrintStream out
= new PrintStream(Files.newOutputStream(dir.resolve(name + ".dot")))) {
Map<String, ModuleDescriptor> nameToModule = cf.modules().stream()
Map<String, ModuleDescriptor> nameToModule;
if (name.equals("java.se.ee")) {
nameToModule = cf.modules().stream()
.map(ResolvedModule::reference)
.map(ModuleReference::descriptor)
.filter(md -> !md.name().startsWith("jdk."))
.collect(Collectors.toMap(ModuleDescriptor::name, Function.identity()));
} else {
nameToModule = cf.modules().stream()
.map(ResolvedModule::reference)
.map(ModuleReference::descriptor)
.collect(Collectors.toMap(ModuleDescriptor::name, Function.identity()));
}
Set<ModuleDescriptor> descriptors = new TreeSet<>(nameToModule.values());
out.format("digraph \"%s\" {%n", name);
@ -162,6 +179,17 @@ public class GenGraphs {
.forEach(mn -> out.format(" \"%s\" [fontcolor=\"%s\", group=%s];%n",
mn, ORANGE, "java"));
out.format("}%n");
// same ranks
ranks.stream()
.forEach(group -> out.format("{rank=same %s}%n",
descriptors.stream()
.map(ModuleDescriptor::name)
.filter(group::contains)
.map(mn -> "\"" + mn + "\"")
.collect(Collectors.joining(","))
));
descriptors.stream()
.filter(jdkGroup::contains)
.map(ModuleDescriptor::name)
@ -177,14 +205,17 @@ public class GenGraphs {
.map(d -> d.name())
.collect(Collectors.toSet());
graph.adjacentNodes(mn).forEach(dn -> {
String attr = dn.equals("java.base") ? REQUIRES_BASE
: (requiresTransitive.contains(dn) ? REEXPORTS : REQUIRES);
int w = weightOf(mn, dn);
if (w > 1)
attr += "weight=" + w;
out.format(" \"%s\" -> \"%s\" [%s];%n", mn, dn, attr);
});
graph.adjacentNodes(mn)
.stream()
.filter(nameToModule::containsKey)
.forEach(dn -> {
String attr = dn.equals("java.base") ? REQUIRES_BASE
: (requiresTransitive.contains(dn) ? REEXPORTS : REQUIRES);
int w = weightOf(mn, dn);
if (w > 1)
attr += "weight=" + w;
out.format(" \"%s\" -> \"%s\" [%s];%n", mn, dn, attr);
});
});
out.println("}");

@ -218,7 +218,7 @@ module java.base {
java.security.jgss;
exports sun.nio.ch to
java.management,
jdk.crypto.pkcs11,
jdk.crypto.token,
jdk.sctp;
exports sun.nio.cs to
java.desktop,
@ -242,14 +242,14 @@ module java.base {
java.desktop,
java.security.jgss;
exports sun.security.internal.interfaces to
jdk.crypto.pkcs11;
jdk.crypto.token;
exports sun.security.internal.spec to
jdk.crypto.pkcs11;
jdk.crypto.token;
exports sun.security.jca to
java.smartcardio,
java.xml.crypto,
jdk.crypto.ec,
jdk.crypto.pkcs11,
jdk.crypto.token,
jdk.naming.dns;
exports sun.security.pkcs to
jdk.crypto.ec,
@ -257,13 +257,13 @@ module java.base {
exports sun.security.provider to
java.rmi,
java.security.jgss,
jdk.crypto.pkcs11,
jdk.crypto.token,
jdk.policytool,
jdk.security.auth;
exports sun.security.provider.certpath to
java.naming;
exports sun.security.rsa to
jdk.crypto.pkcs11;
jdk.crypto.token;
exports sun.security.ssl to
java.security.jgss;
exports sun.security.timestamp to
@ -278,14 +278,14 @@ module java.base {
java.security.sasl,
java.smartcardio,
jdk.crypto.ec,
jdk.crypto.pkcs11,
jdk.crypto.token,
jdk.jartool,
jdk.policytool,
jdk.security.auth,
jdk.security.jgss;
exports sun.security.x509 to
jdk.crypto.ec,
jdk.crypto.pkcs11,
jdk.crypto.token,
jdk.jartool,
jdk.security.auth;
exports sun.text.resources to

@ -125,7 +125,7 @@ grant codeBase "jrt:/jdk.crypto.ec" {
permission java.security.SecurityPermission "removeProviderProperty.SunEC";
};
grant codeBase "jrt:/jdk.crypto.pkcs11" {
grant codeBase "jrt:/jdk.crypto.token" {
permission java.lang.RuntimePermission
"accessClassInPackage.sun.security.*";
permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";

@ -1,33 +0,0 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Aggregates {@code java.base}, {@code java.logging}, and {@code java.scripting}.
*/
module java.compact1 {
requires transitive java.logging;
requires transitive java.scripting;
}

@ -1,35 +0,0 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Supplements {@code java.compact1} with JDBC, JAXP, and RMI.
*/
module java.compact2 {
requires transitive java.compact1;
requires transitive java.rmi;
requires transitive java.sql;
requires transitive java.xml;
}

@ -1,42 +0,0 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Supplements {@code java.compact2} with JDBC RowSet, JMX, JNDI, Compiler,
* Instrumentation, Preferences, Security, and XML cryptography APIs.
*/
module java.compact3 {
requires transitive java.compact2;
requires transitive java.compiler;
requires transitive java.instrument;
requires transitive java.management;
requires transitive java.naming;
requires transitive java.prefs;
requires transitive java.security.jgss;
requires transitive java.security.sasl;
requires transitive java.sql.rowset;
requires transitive java.xml.crypto;
}

@ -26,12 +26,25 @@
/**
* Defines the core Java SE API.
* <P>
* The modules defining
* CORBA and Java EE APIs are not required by this module, but they are
* required by {@code java.se.ee}.
* The modules defining CORBA and Java EE APIs are not required by
* this module, but they are required by {@code java.se.ee}.
*/
module java.se {
requires transitive java.compact3;
requires transitive java.compiler;
requires transitive java.datatransfer;
requires transitive java.desktop;
requires transitive java.instrument;
requires transitive java.logging;
requires transitive java.management;
requires transitive java.naming;
requires transitive java.prefs;
requires transitive java.rmi;
requires transitive java.scripting;
requires transitive java.security.jgss;
requires transitive java.security.sasl;
requires transitive java.sql;
requires transitive java.sql.rowset;
requires transitive java.xml;
requires transitive java.xml.crypto;
}

@ -23,7 +23,7 @@
* questions.
*/
module jdk.crypto.pkcs11 {
module jdk.crypto.token {
// Depends on SunEC provider for EC related functionality
requires jdk.crypto.ec;
provides java.security.Provider with sun.security.pkcs11.SunPKCS11;

Some files were not shown because too many files have changed in this diff Show More