diff --git a/jdk/README b/jdk/README deleted file mode 100644 index 9817e93b584..00000000000 --- a/jdk/README +++ /dev/null @@ -1,27 +0,0 @@ -README: - This file should be located at the top of the jdk Mercurial repository. - - See http://openjdk.java.net/ for more information about the OpenJDK. - -Simple Build Instructions: - - 1. Download and install a JDK 6 from - http://java.sun.com/javase/downloads/index.jsp - Set the environment variable ALT_BOOTDIR to the location of this JDK 6. - - 2. Either download and install the latest JDK7 from - http://download.java.net/openjdk/jdk7/, or build your own complete - OpenJDK7 by using the top level Makefile in the OpenJDK Mercurial forest. - Set the environment variable ALT_JDK_IMPORT_PATH to the location of - this latest JDK7 or OpenJDK7 build. - - 3. Check the sanity of doing a build with the current machine: - cd make && gnumake sanity - See README-builds.html if you run into problems. - - 4. Do a partial build of the jdk: - cd make && gnumake all - - 5. Construct the images: - cd make && gnumake images - The resulting JDK image should be found in build/*/j2sdk-image diff --git a/jdk/make/copy/Copy-java.base.gmk b/jdk/make/copy/Copy-java.base.gmk index 2b85a8b56cb..01764904187 100644 --- a/jdk/make/copy/Copy-java.base.gmk +++ b/jdk/make/copy/Copy-java.base.gmk @@ -235,8 +235,10 @@ endif # JDK license and assembly exception files to be packaged in JMOD -JDK_LICENSE ?= $(TOPDIR)/LICENSE -JDK_NOTICE ?= $(TOPDIR)/ASSEMBLY_EXCEPTION +# The license files may not be present if the source has been obtained using a +# different license. +JDK_LICENSE ?= $(wildcard $(TOPDIR)/LICENSE) +JDK_NOTICE ?= $(wildcard $(TOPDIR)/ASSEMBLY_EXCEPTION) $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \ FILES := $(JDK_LICENSE) $(JDK_NOTICE), \ @@ -245,4 +247,3 @@ $(eval $(call SetupCopyFiles, COPY_JDK_NOTICES, \ )) TARGETS += $(COPY_JDK_NOTICES) - diff --git a/jdk/make/rmic/RmicCommon.gmk b/jdk/make/rmic/RmicCommon.gmk index bfc5b859b54..2eedfda9139 100644 --- a/jdk/make/rmic/RmicCommon.gmk +++ b/jdk/make/rmic/RmicCommon.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, 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 @@ -29,7 +29,7 @@ include $(SPEC) include MakeBase.gmk include RMICompilation.gmk -########################################################################################## +################################################################################ ifeq ($(BOOT_JDK_MODULAR), true) RMIC_MAIN_CLASS := -m jdk.rmic/sun.rmi.rmic.Main @@ -37,12 +37,13 @@ else RMIC_MAIN_CLASS := sun.rmi.rmic.Main endif -RMIC := $(JAVA_SMALL) $(INTERIM_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS) +RMIC := $(JAVA_SMALL) $(INTERIM_RMIC_OVERRIDE_MODULES_ARGS) $(RMIC_MAIN_CLASS) CLASSES_DIR := $(JDK_OUTPUTDIR)/modules -# NOTE: If the smart javac dependency management is reintroduced, these classes risk -# interfering with the dependency checking. In that case they will need to be kept separate. +# NOTE: If the smart javac dependency management is reintroduced, these classes +# risk interfering with the dependency checking. In that case they will need to +# be kept separate. STUB_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules RMIC_GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/rmic -########################################################################################## +################################################################################ diff --git a/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java b/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java index a0e998c7b29..f9bbf1178ec 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectInputFilter.java @@ -104,7 +104,6 @@ public interface ObjectInputFilter { * @return {@link Status#ALLOWED Status.ALLOWED} if accepted, * {@link Status#REJECTED Status.REJECTED} if rejected, * {@link Status#UNDECIDED Status.UNDECIDED} if undecided. - * @since 9 */ Status checkInput(FilterInfo filterInfo); diff --git a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java index ed033d685e9..5c36b7fec01 100644 --- a/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/jdk/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -812,23 +812,24 @@ public class ObjectInputStream } /** - * Enable the stream to allow objects read from the stream to be replaced. - * When enabled, the resolveObject method is called for every object being + * Enables the stream to do replacement of objects read from the stream. When + * enabled, the {@link #resolveObject} method is called for every object being * deserialized. * - *
If enable is true, and there is a security manager installed, + *
If object replacement is currently not enabled, and
+ * {@code enable} is true, and there is a security manager installed,
* this method first calls the security manager's
- * checkPermission method with the
- * SerializablePermission("enableSubstitution") permission to
- * ensure it's ok to enable the stream to allow objects read from the
- * stream to be replaced.
+ * {@code checkPermission} method with the
+ * {@code SerializablePermission("enableSubstitution")} permission to
+ * ensure that the caller is permitted to enable the stream to do replacement
+ * of objects read from the stream.
*
- * @param enable true for enabling use of resolveObject for
+ * @param enable true for enabling use of {@code resolveObject} for
* every object being deserialized
* @return the previous setting before this method was invoked
* @throws SecurityException if a security manager exists and its
- * checkPermission method denies enabling the stream
- * to allow objects read from the stream to be replaced.
+ * {@code checkPermission} method denies enabling the stream
+ * to do replacement of objects read from the stream.
* @see SecurityManager#checkPermission
* @see java.io.SerializablePermission
*/
diff --git a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java
index bff6f8311ee..06845442958 100644
--- a/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/io/ObjectOutputStream.java
@@ -589,22 +589,24 @@ public class ObjectOutputStream
}
/**
- * Enable the stream to do replacement of objects in the stream. When
- * enabled, the replaceObject method is called for every object being
+ * Enables the stream to do replacement of objects written to the stream. When
+ * enabled, the {@link #replaceObject} method is called for every object being
* serialized.
*
- *
If enable is true, and there is a security manager
- * installed, this method first calls the security manager's
- * checkPermission method with a
- * SerializablePermission("enableSubstitution") permission to
- * ensure it's ok to enable the stream to do replacement of objects in the
- * stream.
+ *
If object replacement is currently not enabled, and
+ * {@code enable} is true, and there is a security manager installed,
+ * this method first calls the security manager's
+ * {@code checkPermission} method with the
+ * {@code SerializablePermission("enableSubstitution")} permission to
+ * ensure that the caller is permitted to enable the stream to do replacement
+ * of objects written to the stream.
*
- * @param enable boolean parameter to enable replacement of objects
+ * @param enable true for enabling use of {@code replaceObject} for
+ * every object being serialized
* @return the previous setting before this method was invoked
* @throws SecurityException if a security manager exists and its
- * A version number, {@code $VNUM}, is a non-empty sequence
* of elements separated by period characters (U+002E). An element is
- * either zero, or a unsigned integer numeral without leading zeros. The
+ * either zero, or an unsigned integer numeral without leading zeros. The
* final element in a version number must not be zero. The format is:
* A version number {@code 10-ea} matches {@code $VNUM = "10"} and
- * {@code $PRE = "ea"}. The version number {@code 10+-ea} matches
+ * A version string {@code 10-ea} matches {@code $VNUM = "10"} and
+ * {@code $PRE = "ea"}. The version string {@code 10+-ea} matches
* {@code $VNUM = "10"} and {@code $OPT = "ea"}. When comparing two version strings, the value of {@code $OPT}, if
@@ -1247,7 +1247,7 @@ public class Runtime {
* Compares this version to another.
*
* Each of the components in the version is
- * compared in the follow order of precedence: version numbers,
+ * compared in the following order of precedence: version numbers,
* pre-release identifiers, build numbers, optional build information.
*
* The {@code estimateDepth} specifies the estimate number of stack frames
@@ -376,7 +376,7 @@ public final class StackWalker {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (options.contains(Option.RETAIN_CLASS_REFERENCE)) {
- sm.checkPermission(new StackFramePermission("retainClassReference"));
+ sm.checkPermission(new RuntimePermission("getStackWalkerWithClassReference"));
}
}
}
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java
index 53899611f59..031e18a759a 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/CallSite.java
@@ -82,6 +82,7 @@ private static CallSite bootstrapDynamic(MethodHandles.Lookup caller, String nam
}
}
* @author John Rose, JSR 292 EG
+ * @since 1.7
*/
abstract
public class CallSite {
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java
index f27d0e7bbd2..f7d87ba45ac 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/ConstantCallSite.java
@@ -30,6 +30,7 @@ package java.lang.invoke;
* An {@code invokedynamic} instruction linked to a {@code ConstantCallSite} is permanently
* bound to the call site's target.
* @author John Rose, JSR 292 EG
+ * @since 1.7
*/
public class ConstantCallSite extends CallSite {
private final boolean isFrozen;
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java
index e1123da59d8..2dc8f22c01d 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaConversionException.java
@@ -27,6 +27,8 @@ package java.lang.invoke;
/**
* LambdaConversionException
+ *
+ * @since 1.8
*/
public class LambdaConversionException extends Exception {
private static final long serialVersionUID = 292L + 8L;
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
index b6ef976c515..b09744cba7d 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/LambdaMetafactory.java
@@ -211,6 +211,7 @@ import java.util.Arrays;
* theory, any method handle could be used. Currently supported are direct method
* handles representing invocation of virtual, interface, constructor and static
* methods.
+ * @since 1.8
*/
public class LambdaMetafactory {
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java
index 6265b874175..3ec8b63bcbd 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandle.java
@@ -423,6 +423,7 @@ mh.invokeExact(System.out, "Hello, world.");
* @see MethodType
* @see MethodHandles
* @author John Rose, JSR 292 EG
+ * @since 1.7
*/
public abstract class MethodHandle {
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
index 09db4f93512..fce6e0fef01 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java
@@ -38,6 +38,8 @@ import static java.lang.invoke.MethodHandleStatics.*;
/**
* This class consists exclusively of static methods that help adapt
* method handles to other JVM types, such as interfaces.
+ *
+ * @since 1.7
*/
public class MethodHandleProxies {
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java
index 53e88de34f2..860ef23f019 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodType.java
@@ -88,6 +88,7 @@ import sun.invoke.util.VerifyType;
* (But the classes need not be initialized, as is the case with a {@code CONSTANT_Class}.)
* This loading may occur at any time before the {@code MethodType} object is first derived.
* @author John Rose, JSR 292 EG
+ * @since 1.7
*/
public final
class MethodType implements java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java
index 6e5d350495d..2d32abde706 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MutableCallSite.java
@@ -81,6 +81,7 @@ assertEquals("Wilma, dear?", (String) worker2.invokeExact());
* For target values which will be frequently updated, consider using
* a {@linkplain VolatileCallSite volatile call site} instead.
* @author John Rose, JSR 292 EG
+ * @since 1.7
*/
public class MutableCallSite extends CallSite {
/**
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java b/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java
index d9f94f39e77..0566e6b483e 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java
@@ -54,6 +54,7 @@ import java.util.Objects;
* lambda actually captured by that class.
*
* @see LambdaMetafactory
+ * @since 1.8
*/
public final class SerializedLambda implements Serializable {
private static final long serialVersionUID = 8025925345765570181L;
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java b/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java
index 5d9b3bfe843..83b4d49cd42 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/SwitchPoint.java
@@ -108,6 +108,7 @@ package java.lang.invoke;
* }
* }
* @author Remi Forax, JSR 292 EG
+ * @since 1.7
*/
public class SwitchPoint {
private static final MethodHandle
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java b/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java
index de88f36bbb3..1046e72edf6 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/VolatileCallSite.java
@@ -40,6 +40,7 @@ package java.lang.invoke;
* with {@code MutableCallSite}.
* @see MutableCallSite
* @author John Rose, JSR 292 EG
+ * @since 1.7
*/
public class VolatileCallSite extends CallSite {
/**
diff --git a/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java b/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java
index 82cf096c848..60d4551419f 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/ClosedFileSystemException.java
@@ -28,6 +28,8 @@ package java.nio.file;
/**
* Unchecked exception thrown when an attempt is made to invoke an operation on
* a file and the file system is closed.
+ *
+ * @since 1.7
*/
public class ClosedFileSystemException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java b/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java
index 3995b6def60..4990a7aca3f 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/ClosedWatchServiceException.java
@@ -28,6 +28,8 @@ package java.nio.file;
/**
* Unchecked exception thrown when an attempt is made to invoke an operation on
* a watch service that is closed.
+ *
+ * @since 1.7
*/
public class ClosedWatchServiceException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java
index e305542508f..5877410473e 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystemAlreadyExistsException.java
@@ -28,6 +28,8 @@ package java.nio.file;
/**
* Runtime exception thrown when an attempt is made to create a file system that
* already exists.
+ *
+ * @since 1.7
*/
public class FileSystemAlreadyExistsException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java b/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java
index 1c0ee4cb731..e50eafb5d6d 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/FileSystemNotFoundException.java
@@ -27,6 +27,8 @@ package java.nio.file;
/**
* Runtime exception thrown when a file system cannot be found.
+ *
+ * @since 1.7
*/
public class FileSystemNotFoundException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java
index 0502d7ba809..2dc3597ded8 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/InvalidPathException.java
@@ -29,6 +29,8 @@ package java.nio.file;
* Unchecked exception thrown when path string cannot be converted into a
* {@link Path} because the path string contains invalid characters, or
* the path string is invalid for other file system specific reasons.
+ *
+ * @since 1.7
*/
public class InvalidPathException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java b/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java
index 0220d6e173f..9e628cbdfc7 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/ProviderMismatchException.java
@@ -29,6 +29,8 @@ package java.nio.file;
* Unchecked exception thrown when an attempt is made to invoke a method on an
* object created by one file system provider with a parameter created by a
* different file system provider.
+ *
+ * @since 1.7
*/
public class ProviderMismatchException
extends java.lang.IllegalArgumentException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java b/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java
index 8fa0cefaf3b..41f9819aacb 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/ProviderNotFoundException.java
@@ -27,6 +27,8 @@ package java.nio.file;
/**
* Runtime exception thrown when a provider of the required type cannot be found.
+ *
+ * @since 1.7
*/
public class ProviderNotFoundException
diff --git a/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java b/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java
index 9b25e5f054b..0b9d42a2bbb 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/ReadOnlyFileSystemException.java
@@ -28,6 +28,8 @@ package java.nio.file;
/**
* Unchecked exception thrown when an attempt is made to update an object
* associated with a {@link FileSystem#isReadOnly() read-only} {@code FileSystem}.
+ *
+ * @since 1.7
*/
public class ReadOnlyFileSystemException
diff --git a/jdk/src/java.base/share/classes/java/security/SecureRandom.java b/jdk/src/java.base/share/classes/java/security/SecureRandom.java
index 9154060bfcd..0fe361044b8 100644
--- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java
+++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2017, 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
@@ -40,7 +40,7 @@ import sun.security.util.Debug;
*
* A cryptographically strong random number minimally complies with the
* statistical random number generator tests specified in
- *
+ *
* FIPS 140-2, Security Requirements for Cryptographic Modules,
* section 4.9.1.
* Additionally, {@code SecureRandom} must produce non-deterministic output.
diff --git a/jdk/src/java.base/share/classes/java/time/Duration.java b/jdk/src/java.base/share/classes/java/time/Duration.java
index cacd3999a83..875b9e07761 100644
--- a/jdk/src/java.base/share/classes/java/time/Duration.java
+++ b/jdk/src/java.base/share/classes/java/time/Duration.java
@@ -1370,6 +1370,7 @@ public final class Duration
* @return a {@code Duration} based on this duration with the time truncated, not null
* @throws DateTimeException if the unit is invalid for truncation
* @throws UnsupportedTemporalTypeException if the unit is not supported
+ * @since 9
*/
public Duration truncatedTo(TemporalUnit unit) {
Objects.requireNonNull(unit, "unit");
diff --git a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java
index 8fe990a4f05..f734fdd9d02 100644
--- a/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java
+++ b/jdk/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java
@@ -1278,6 +1278,7 @@ public final class DateTimeFormatterBuilder {
*
* @param textStyle the text style to use, not null
* @return this, for chaining, not null
+ * @since 9
*/
public DateTimeFormatterBuilder appendGenericZoneText(TextStyle textStyle) {
appendInternal(new ZoneTextPrinterParser(textStyle, null, true));
@@ -1303,6 +1304,7 @@ public final class DateTimeFormatterBuilder {
* @param textStyle the text style to use, not null
* @param preferredZones the set of preferred zone ids, not null
* @return this, for chaining, not null
+ * @since 9
*/
public DateTimeFormatterBuilder appendGenericZoneText(TextStyle textStyle,
Set
+ * {@code AlgorithmConstraints}, {@code Timestamp}, and {@code String}
+ * variant.
+ *
* Note that this constructor can initialize a variation of situations where
* the AlgorithmConstraints, Timestamp, or Variant maybe known.
*
@@ -134,32 +134,28 @@ public final class AlgorithmChecker extends PKIXCertPathChecker {
*/
public AlgorithmChecker(AlgorithmConstraints constraints,
Timestamp jarTimestamp, String variant) {
- this.prevPubKey = null;
- this.trustedPubKey = null;
- this.constraints = (constraints == null ? certPathDefaultConstraints :
- constraints);
- this.pkixdate = (jarTimestamp != null ? jarTimestamp.getTimestamp() :
- null);
- this.jarTimestamp = jarTimestamp;
- this.variant = (variant == null ? Validator.VAR_GENERIC : variant);
+ this(null, constraints, null, jarTimestamp, variant);
}
/**
* Create a new {@code AlgorithmChecker} with the
- * given {@code TrustAnchor} and {@code AlgorithmConstraints}.
+ * given {@code TrustAnchor}, {@code AlgorithmConstraints},
+ * {@code Timestamp}, and {@code String} variant.
*
* @param anchor the trust anchor selected to validate the target
* certificate
* @param constraints the algorithm constraints (or null)
- * @param pkixdate Date the constraints are checked against. The value is
- * either the PKIXParameter date or null for the current date.
+ * @param pkixdate The date specified by the PKIXParameters date. If the
+ * PKIXParameters is null, the current date is used. This
+ * should be null when jar files are being checked.
+ * @param jarTimestamp Timestamp passed for JAR timestamp constraint
+ * checking. Set to null if not applicable.
* @param variant is the Validator variants of the operation. A null value
* passed will set it to Validator.GENERIC.
- *
- * @throws IllegalArgumentException if the {@code anchor} is null
*/
public AlgorithmChecker(TrustAnchor anchor,
- AlgorithmConstraints constraints, Date pkixdate, String variant) {
+ AlgorithmConstraints constraints, Date pkixdate,
+ Timestamp jarTimestamp, String variant) {
if (anchor != null) {
if (anchor.getTrustedCert() != null) {
@@ -179,28 +175,30 @@ public final class AlgorithmChecker extends PKIXCertPathChecker {
}
}
- this.prevPubKey = trustedPubKey;
- this.constraints = constraints;
- this.pkixdate = pkixdate;
- this.jarTimestamp = null;
+ this.prevPubKey = this.trustedPubKey;
+ this.constraints = (constraints == null ? certPathDefaultConstraints :
+ constraints);
+ // If we are checking jar files, set pkixdate the same as the timestamp
+ // for certificate checking
+ this.pkixdate = (jarTimestamp != null ? jarTimestamp.getTimestamp() :
+ pkixdate);
+ this.jarTimestamp = jarTimestamp;
this.variant = (variant == null ? Validator.VAR_GENERIC : variant);
}
/**
- * Create a new {@code AlgorithmChecker} with the
- * given {@code TrustAnchor} and {@code PKIXParameter} date.
+ * Create a new {@code AlgorithmChecker} with the given {@code TrustAnchor},
+ * {@code PKIXParameter} date, and {@code varient}
*
* @param anchor the trust anchor selected to validate the target
* certificate
* @param pkixdate Date the constraints are checked against. The value is
- * either the PKIXParameter date or null for the current date.
+ * either the PKIXParameters date or null for the current date.
* @param variant is the Validator variants of the operation. A null value
* passed will set it to Validator.GENERIC.
- *
- * @throws IllegalArgumentException if the {@code anchor} is null
*/
public AlgorithmChecker(TrustAnchor anchor, Date pkixdate, String variant) {
- this(anchor, certPathDefaultConstraints, pkixdate, variant);
+ this(anchor, certPathDefaultConstraints, pkixdate, null, variant);
}
// Check this 'cert' for restrictions in the AnchorCertificates
@@ -216,10 +214,6 @@ public final class AlgorithmChecker extends PKIXCertPathChecker {
return AnchorCertificates.contains(cert);
}
- Timestamp getJarTimestamp() {
- return jarTimestamp;
- }
-
@Override
public void init(boolean forward) throws CertPathValidatorException {
// Note that this class does not support forward mode.
diff --git a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java
index b8e20e832f1..53ae439baf3 100644
--- a/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java
+++ b/jdk/src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java
@@ -172,12 +172,8 @@ public final class PKIXCertPathValidator extends CertPathValidatorSpi {
List Implementation note: In Sun's JRE, the {@code PreferencesFactory}
- * implementation is located as follows:
+ * @implNote
+ * The {@code PreferencesFactory} implementation is located as follows:
*
* The SQLstate for a The SQLstate for a The date components should be set to the "zero epoch"
* value of January 1, 1970 and should not be accessed.
+ *
+ * @since 1.1
*/
public class Time extends java.util.Date {
diff --git a/jdk/src/java.sql/share/classes/java/sql/Timestamp.java b/jdk/src/java.sql/share/classes/java/sql/Timestamp.java
index 8421f955db6..968d6e76b9f 100644
--- a/jdk/src/java.sql/share/classes/java/sql/Timestamp.java
+++ b/jdk/src/java.sql/share/classes/java/sql/Timestamp.java
@@ -69,6 +69,8 @@ import jdk.internal.misc.JavaLangAccess;
* inheritance relationship between {@code Timestamp}
* and {@code java.util.Date} really
* denotes implementation inheritance, and not type inheritance.
+ *
+ * @since 1.1
*/
public class Timestamp extends java.util.Date {
diff --git a/jdk/src/java.sql/share/classes/java/sql/Types.java b/jdk/src/java.sql/share/classes/java/sql/Types.java
index 9f613ead14c..11372468e66 100644
--- a/jdk/src/java.sql/share/classes/java/sql/Types.java
+++ b/jdk/src/java.sql/share/classes/java/sql/Types.java
@@ -30,6 +30,8 @@ package java.sql;
* SQL types, called JDBC types.
*
* This class is never instantiated.
+ *
+ * @since 1.1
*/
public class Types {
diff --git a/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java
index dc35105f62f..0d046742531 100644
--- a/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java
+++ b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAException.java
@@ -29,6 +29,7 @@ package javax.transaction.xa;
* The XAException is thrown by the Resource Manager (RM) to inform the
* Transaction Manager of an error encountered by the involved transaction.
*
+ * @since 1.4
*/
public class XAException extends Exception {
diff --git a/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
index 489818e98a5..f8b26ffd789 100644
--- a/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
+++ b/jdk/src/java.sql/share/classes/javax/transaction/xa/XAResource.java
@@ -56,6 +56,7 @@ package javax.transaction.xa;
* the transaction manager to prepare, commit, or rollback a transaction
* according to the two-phase commit protocol.checkPermission method denies enabling the stream
- * to do replacement of objects in the stream.
+ * {@code checkPermission} method denies enabling the stream
+ * to do replacement of objects written to the stream.
* @see SecurityManager#checkPermission
* @see java.io.SerializablePermission
*/
diff --git a/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java b/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java
index 612ff09f138..13dfa34be8f 100644
--- a/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java
+++ b/jdk/src/java.base/share/classes/java/lang/LiveStackFrame.java
@@ -169,7 +169,7 @@ interface LiveStackFrame extends StackFrame {
* it denies access to {@code RuntimePermission("liveStackFrames")}; or
* or if the given {@code options} contains
* {@link StackWalker.Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE}
- * and it denies access to {@code StackFramePermission("retainClassReference")}.
+ * and it denies access to {@code RuntimePermission("getStackWalkerWithClassReference")}.
*/
public static StackWalker getStackWalker(Set
+ *
+ *
+ * getStackWalkerWithClassReference
+ * Get a stack walker that can retrieve stack frames with class reference.
+ * This allows retrieval of Class objects from stack walking.
+ * This might allow malicious code to access Class objects on the stack
+ * outside its own context.
+ *
* setDefaultUncaughtExceptionHandler
* Setting the default handler to be used when a thread
* terminates abruptly due to an uncaught exception
diff --git a/jdk/src/java.base/share/classes/java/lang/StackFramePermission.java b/jdk/src/java.base/share/classes/java/lang/StackFramePermission.java
deleted file mode 100644
index 58dcba496be..00000000000
--- a/jdk/src/java.base/share/classes/java/lang/StackFramePermission.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2015, 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.
- */
-package java.lang;
-
-/**
- * Permission to access {@link StackWalker.StackFrame}.
- *
- * @see java.lang.StackWalker.Option#RETAIN_CLASS_REFERENCE
- * @see StackWalker.StackFrame#getDeclaringClass()
- */
-public class StackFramePermission extends java.security.BasicPermission {
- private static final long serialVersionUID = 2841894854386706014L;
-
- /**
- * Creates a new {@code StackFramePermission} object.
- *
- * @param name Permission name. Must be "retainClassReference".
- *
- * @throws IllegalArgumentException if {@code name} is invalid.
- * @throws NullPointerException if {@code name} is {@code null}.
- */
- public StackFramePermission(String name) {
- super(name);
- if (!name.equals("retainClassReference")) {
- throw new IllegalArgumentException("name: " + name);
- }
- }
-}
diff --git a/jdk/src/java.base/share/classes/java/lang/StackWalker.java b/jdk/src/java.base/share/classes/java/lang/StackWalker.java
index 52d9637c138..7e4bc1ebf88 100644
--- a/jdk/src/java.base/share/classes/java/lang/StackWalker.java
+++ b/jdk/src/java.base/share/classes/java/lang/StackWalker.java
@@ -279,7 +279,7 @@ public final class StackWalker {
* If a security manager is present and the given {@code option} is
* {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE},
* it calls its {@link SecurityManager#checkPermission checkPermission}
- * method for {@code StackFramePermission("retainClassReference")}.
+ * method for {@code RuntimePermission("getStackWalkerWithClassReference")}.
*
* @param option {@link Option stack walking option}
*
@@ -303,7 +303,7 @@ public final class StackWalker {
* If a security manager is present and the given {@code options} contains
* {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE},
* it calls its {@link SecurityManager#checkPermission checkPermission}
- * method for {@code StackFramePermission("retainClassReference")}.
+ * method for {@code RuntimePermission("getStackWalkerWithClassReference")}.
*
* @param options {@link Option stack walking option}
*
@@ -333,7 +333,7 @@ public final class StackWalker {
* If a security manager is present and the given {@code options} contains
* {@link Option#RETAIN_CLASS_REFERENCE Option.RETAIN_CLASS_REFERENCE},
* it calls its {@link SecurityManager#checkPermission checkPermission}
- * method for {@code StackFramePermission("retainClassReference")}.
+ * method for {@code RuntimePermission("getStackWalkerWithClassReference")}.
*
*
Portions Copyright Eastman Kodak Company 1991-2003
+
+
diff --git a/jdk/src/java.desktop/share/legal/jpeg.md b/jdk/src/java.desktop/share/legal/jpeg.md
index 681d9f5bf8a..91f27bd838a 100644
--- a/jdk/src/java.desktop/share/legal/jpeg.md
+++ b/jdk/src/java.desktop/share/legal/jpeg.md
@@ -1,4 +1,4 @@
-## JPEG rb6
+## JPEG release 6b
### JPEG License
diff --git a/jdk/src/java.desktop/share/legal/libpng.md b/jdk/src/java.desktop/share/legal/libpng.md
index cd9f613d29f..5619bd1c8bb 100644
--- a/jdk/src/java.desktop/share/legal/libpng.md
+++ b/jdk/src/java.desktop/share/legal/libpng.md
@@ -1,6 +1,6 @@
-## Libpng v 1.6.23
+## libpng v1.6.23
-### Libpng License
+### libpng License
This copy of the libpng notices is provided for your convenience. In case of
diff --git a/jdk/src/java.desktop/share/legal/mesa3d.md b/jdk/src/java.desktop/share/legal/mesa3d.md
index 50c2114af6a..3d2168e3247 100644
--- a/jdk/src/java.desktop/share/legal/mesa3d.md
+++ b/jdk/src/java.desktop/share/legal/mesa3d.md
@@ -1,6 +1,6 @@
## Mesa 3-D Graphics Library v4.1
-### Mesa 3-D Graphics Library License
+### Mesa License
Mesa 3-D graphics library
diff --git a/jdk/src/java.desktop/unix/legal/fontconfig.md b/jdk/src/java.desktop/unix/legal/fontconfig.md
index abdebf351e7..50f353d86cd 100644
--- a/jdk/src/java.desktop/unix/legal/fontconfig.md
+++ b/jdk/src/java.desktop/unix/legal/fontconfig.md
@@ -1,6 +1,6 @@
-## FontConfig v2.5
+## Fontconfig v2.5
-### FontConfig License
+### Fontconfig License
Copyright 2001,2003 Keith Packard
diff --git a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java
index 7e8ec41d84f..cb03b2af40e 100644
--- a/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java
+++ b/jdk/src/java.logging/share/classes/java/util/logging/LogManager.java
@@ -1839,6 +1839,7 @@ public class LogManager {
* logging configuration file.
*
* @see #updateConfiguration(java.io.InputStream, java.util.function.Function)
+ * @since 9
*/
public void updateConfiguration(Function
+ *
+ * @since 9
*/
public interface ShardingKeyBuilder {
diff --git a/jdk/src/java.sql/share/classes/java/sql/Statement.java b/jdk/src/java.sql/share/classes/java/sql/Statement.java
index fe40a2f988e..582d4f2c1ce 100644
--- a/jdk/src/java.sql/share/classes/java/sql/Statement.java
+++ b/jdk/src/java.sql/share/classes/java/sql/Statement.java
@@ -42,6 +42,7 @@ import static java.util.stream.Collectors.joining;
*
* @see Connection#createStatement
* @see ResultSet
+ * @since 1.1
*/
public interface Statement extends Wrapper, AutoCloseable {
@@ -1399,6 +1400,8 @@ public interface Statement extends Wrapper, AutoCloseable {
* converted to two single quotes
* @throws NullPointerException if val is {@code null}
* @throws SQLException if a database access error occurs
+ *
+ * @since 9
*/
default String enquoteLiteral(String val) throws SQLException {
return "'" + val.replace("'", "''") + "'";
@@ -1503,6 +1506,8 @@ public interface Statement extends Wrapper, AutoCloseable {
* @throws SQLFeatureNotSupportedException if the datasource does not support
* delimited identifiers
* @throws NullPointerException if identifier is {@code null}
+ *
+ * @since 9
*/
default String enquoteIdentifier(String identifier, boolean alwaysQuote) throws SQLException {
int len = identifier.length();
@@ -1576,6 +1581,8 @@ public interface Statement extends Wrapper, AutoCloseable {
* @return true if a simple SQL identifier, false otherwise
* @throws NullPointerException if identifier is {@code null}
* @throws SQLException if a database access error occurs
+ *
+ * @since 9
*/
default boolean isSimpleIdentifier(String identifier) throws SQLException {
int len = identifier.length();
@@ -1617,6 +1624,8 @@ public interface Statement extends Wrapper, AutoCloseable {
* then prefixed with 'N'.
* @throws NullPointerException if val is {@code null}
* @throws SQLException if a database access error occurs
+ *
+ * @since 9
*/
default String enquoteNCharLiteral(String val) throws SQLException {
return "N'" + val.replace("'", "''") + "'";
diff --git a/jdk/src/java.sql/share/classes/java/sql/Time.java b/jdk/src/java.sql/share/classes/java/sql/Time.java
index f764e0a685c..3d1f237933c 100644
--- a/jdk/src/java.sql/share/classes/java/sql/Time.java
+++ b/jdk/src/java.sql/share/classes/java/sql/Time.java
@@ -38,6 +38,8 @@ import jdk.internal.misc.JavaLangAccess;
* values.
*
*
diff --git a/jdk/src/java.smartcardio/unix/legal/pcsclite.md b/jdk/src/java.smartcardio/unix/legal/pcsclite.md
index f90e9cc517d..380062df18a 100644
--- a/jdk/src/java.smartcardio/unix/legal/pcsclite.md
+++ b/jdk/src/java.smartcardio/unix/legal/pcsclite.md
@@ -1,6 +1,6 @@
## PC/SC Lite for Suse Linux v1.1.1
-### PC/SC Lite for Suse Linux License
+### PC/SC Lite License
Copyright (c) 1999-2004 David Corcoran
+ *
+ * @since 1.1
*/
public interface ResultSetMetaData extends Wrapper {
diff --git a/jdk/src/java.sql/share/classes/java/sql/SQLException.java b/jdk/src/java.sql/share/classes/java/sql/SQLException.java
index 95276a0d091..b46e82f5100 100644
--- a/jdk/src/java.sql/share/classes/java/sql/SQLException.java
+++ b/jdk/src/java.sql/share/classes/java/sql/SQLException.java
@@ -49,6 +49,8 @@ import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
* error information.
* DataTruncation during read is 01004.
* DataTruncation during write is 22001.
+ *
+ * @since 1.1
*/
public class DataTruncation extends SQLWarning {
diff --git a/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java b/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
index 8d8c621506c..bc4e1fbe768 100644
--- a/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
+++ b/jdk/src/java.sql/share/classes/java/sql/DatabaseMetaData.java
@@ -68,6 +68,7 @@ package java.sql;
* argument is set to null, that argument's criterion will
* be dropped from the search.
*
+ * @since 1.1
*/
public interface DatabaseMetaData extends Wrapper {
diff --git a/jdk/src/java.sql/share/classes/java/sql/Date.java b/jdk/src/java.sql/share/classes/java/sql/Date.java
index f784e72e1e3..a6d8d8f4016 100644
--- a/jdk/src/java.sql/share/classes/java/sql/Date.java
+++ b/jdk/src/java.sql/share/classes/java/sql/Date.java
@@ -41,6 +41,8 @@ import jdk.internal.misc.JavaLangAccess;
* must be 'normalized' by setting the
* hours, minutes, seconds, and milliseconds to zero in the particular
* time zone with which the instance is associated.
+ *
+ * @since 1.1
*/
public class Date extends java.util.Date {
diff --git a/jdk/src/java.sql/share/classes/java/sql/Driver.java b/jdk/src/java.sql/share/classes/java/sql/Driver.java
index 3bb3e0c4576..56c89273c9e 100644
--- a/jdk/src/java.sql/share/classes/java/sql/Driver.java
+++ b/jdk/src/java.sql/share/classes/java/sql/Driver.java
@@ -54,6 +54,7 @@ import java.util.logging.Logger;
* @see DriverManager
* @see Connection
* @see DriverAction
+ * @since 1.1
*/
public interface Driver {
diff --git a/jdk/src/java.sql/share/classes/java/sql/DriverManager.java b/jdk/src/java.sql/share/classes/java/sql/DriverManager.java
index 84456bd57eb..6c4f68a58b8 100644
--- a/jdk/src/java.sql/share/classes/java/sql/DriverManager.java
+++ b/jdk/src/java.sql/share/classes/java/sql/DriverManager.java
@@ -78,6 +78,7 @@ import jdk.internal.reflect.Reflection;
*
* @see Driver
* @see Connection
+ * @since 1.1
*/
public class DriverManager {
diff --git a/jdk/src/java.sql/share/classes/java/sql/DriverPropertyInfo.java b/jdk/src/java.sql/share/classes/java/sql/DriverPropertyInfo.java
index b5a6452697d..4ccf2bc5c77 100644
--- a/jdk/src/java.sql/share/classes/java/sql/DriverPropertyInfo.java
+++ b/jdk/src/java.sql/share/classes/java/sql/DriverPropertyInfo.java
@@ -31,6 +31,8 @@ package java.sql;
* who need to interact with a Driver via the method
* getDriverProperties to discover
* and supply properties for connections.
+ *
+ * @since 1.1
*/
public class DriverPropertyInfo {
diff --git a/jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java b/jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java
index efeb136dde3..c118927942f 100644
--- a/jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java
+++ b/jdk/src/java.sql/share/classes/java/sql/PreparedStatement.java
@@ -56,6 +56,7 @@ import java.io.InputStream;
*
* @see Connection#prepareStatement
* @see ResultSet
+ * @since 1.1
*/
public interface PreparedStatement extends Statement {
diff --git a/jdk/src/java.sql/share/classes/java/sql/ResultSet.java b/jdk/src/java.sql/share/classes/java/sql/ResultSet.java
index 4170b89de2d..07fb0b20b9a 100644
--- a/jdk/src/java.sql/share/classes/java/sql/ResultSet.java
+++ b/jdk/src/java.sql/share/classes/java/sql/ResultSet.java
@@ -143,6 +143,7 @@ import java.io.InputStream;
* @see Statement#executeQuery
* @see Statement#getResultSet
* @see ResultSetMetaData
+ * @since 1.1
*/
public interface ResultSet extends Wrapper, AutoCloseable {
diff --git a/jdk/src/java.sql/share/classes/java/sql/ResultSetMetaData.java b/jdk/src/java.sql/share/classes/java/sql/ResultSetMetaData.java
index c1dd474b565..ea5659fd333 100644
--- a/jdk/src/java.sql/share/classes/java/sql/ResultSetMetaData.java
+++ b/jdk/src/java.sql/share/classes/java/sql/ResultSetMetaData.java
@@ -40,6 +40,8 @@ package java.sql;
* boolean b = rsmd.isSearchable(1);
*
* SQLException.
*
+ *
+ * @since 1.1
*/
public class SQLException extends java.lang.Exception
implements Iterable
Apache Santuario - XML Security for Java
diff --git a/jdk/src/jdk.crypto.cryptoki/share/legal/pkcs11cryptotoken.md b/jdk/src/jdk.crypto.cryptoki/share/legal/pkcs11cryptotoken.md
index 6f7e3fb92ec..9f786fa3f50 100644
--- a/jdk/src/jdk.crypto.cryptoki/share/legal/pkcs11cryptotoken.md
+++ b/jdk/src/jdk.crypto.cryptoki/share/legal/pkcs11cryptotoken.md
@@ -1,4 +1,4 @@
-## PKCS #11 Cryptographic Token Interface, v2.20 amendment 3 Header Files
+## PKCS #11 Cryptographic Token Interface v2.20 Amendment 3 Header Files
### PKCS #11 Cryptographic Token Interface License
diff --git a/jdk/src/jdk.crypto.ec/share/legal/ecc.md b/jdk/src/jdk.crypto.ec/share/legal/ecc.md
index 6d4fc59a453..2ce66e448b1 100644
--- a/jdk/src/jdk.crypto.ec/share/legal/ecc.md
+++ b/jdk/src/jdk.crypto.ec/share/legal/ecc.md
@@ -1,6 +1,6 @@
-## Mozilla Elliptic Curve Cryptography
+## Mozilla Elliptic Curve Cryptography (ECC)
-### Notice
+### Mozilla ECC Notice
This notice is provided with respect to Elliptic Curve Cryptography,
@@ -21,7 +21,7 @@ Elliptic Curve Cryptography library:
-### LGPL 2.1 License
+### LGPL 2.1
GNU LESSER GENERAL PUBLIC LICENSE
diff --git a/jdk/src/jdk.policytool/share/classes/module-info.java b/jdk/src/jdk.policytool/share/classes/module-info.java
index 8ae0f88aa3a..9a3818692f0 100644
--- a/jdk/src/jdk.policytool/share/classes/module-info.java
+++ b/jdk/src/jdk.policytool/share/classes/module-info.java
@@ -27,10 +27,9 @@
* GUI tool for managing policy files.
*
* @since 9
- * @deprecated The policytool tool has been deprecated and
- * is planned to be removed in a future release.
+ * @deprecated
*/
-@Deprecated
+@Deprecated(since="9", forRemoval=true)
module jdk.policytool {
requires java.desktop;
requires java.logging;
diff --git a/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
index b560e053d97..31e5a5e2b04 100644
--- a/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
+++ b/jdk/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
@@ -65,11 +65,12 @@ import javax.swing.border.EmptyBorder;
*
* @see java.security.Policy
* @since 1.2
- * @deprecated The policytool tool has been deprecated and
- * is planned to be removed in a future release.
+ * @deprecated {@code policytool} has been deprecated for removal because it
+ * is rarely used, and it provides little value over editing policy
+ * files using a text editor.
*/
-@Deprecated
+@Deprecated(since="9", forRemoval=true)
public class PolicyTool {
// for i18n
diff --git a/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java b/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java
index 4c0dcc97f7a..2fec88e022c 100644
--- a/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java
+++ b/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -28,6 +28,7 @@ package jdk.nio.zipfs;
import java.io.IOException;
import java.io.InputStream;
import java.lang.Runtime.Version;
+import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashMap;
@@ -86,12 +87,12 @@ class JarFileSystem extends ZipFileSystem {
}
}
- private boolean isMultiReleaseJar() {
+ private boolean isMultiReleaseJar() throws IOException {
try (InputStream is = newInputStream(getBytes("/META-INF/MANIFEST.MF"))) {
- return (new Manifest(is)).getMainAttributes()
- .containsKey(new Attributes.Name("Multi-Release"));
- // fixme change line above after JarFile integration to contain Attributes.Name.MULTI_RELEASE
- } catch (IOException x) {
+ String multiRelease = new Manifest(is).getMainAttributes()
+ .getValue(Attributes.Name.MULTI_RELEASE);
+ return "true".equalsIgnoreCase(multiRelease);
+ } catch (NoSuchFileException x) {
return false;
}
}
diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt
index 7d03151d2e2..d83f5106868 100644
--- a/jdk/test/ProblemList.txt
+++ b/jdk/test/ProblemList.txt
@@ -215,9 +215,8 @@ sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-
javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64
javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x64
-sun/security/krb5/auto/Basic.java 8176296 generic-all
-
sun/security/ssl/X509KeyManager/PreferredKey.java 8176354 generic-all
+
############################################################################
# jdk_sound
diff --git a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java
index d6402f7b566..2abfbd88e6d 100644
--- a/jdk/test/java/io/FileInputStream/LargeFileAvailable.java
+++ b/jdk/test/java/io/FileInputStream/LargeFileAvailable.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, 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
@@ -27,6 +27,7 @@
* @key intermittent
* @summary Test if available returns correct value when reading
* a large file.
+ * @run main/timeout=300 LargeFileAvailable
*/
import java.io.*;
@@ -34,6 +35,7 @@ import java.nio.ByteBuffer;
import java.nio.channels.*;
import java.nio.file.Files;
import static java.nio.file.StandardOpenOption.*;
+import java.util.concurrent.TimeUnit;
public class LargeFileAvailable {
public static void main(String args[]) throws Exception {
@@ -110,7 +112,12 @@ public class LargeFileAvailable {
CREATE_NEW, WRITE, SPARSE)) {
ByteBuffer bb = ByteBuffer.allocate(1).put((byte)1);
bb.rewind();
+ System.out.println(" Writing large file...");
+ long t0 = System.nanoTime();
int rc = fc.write(bb, filesize - 1);
+ long t1 = System.nanoTime();
+ System.out.printf(" Wrote large file in %d ns (%d ms) %n",
+ t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0));
if (rc != 1) {
throw new RuntimeException("Failed to write 1 byte"
diff --git a/jdk/test/java/lang/Runtime/Version/Basic.java b/jdk/test/java/lang/Runtime/Version/Basic.java
index 36ec6b42a16..52a6006f14f 100644
--- a/jdk/test/java/lang/Runtime/Version/Basic.java
+++ b/jdk/test/java/lang/Runtime/Version/Basic.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -24,7 +24,7 @@
/*
* @test
* @summary Unit test for java.lang.Runtime.Version.
- * @bug 8072379 8144062 8161236
+ * @bug 8072379 8144062 8161236 8160956
*/
import java.lang.reflect.InvocationTargetException;
@@ -140,7 +140,7 @@ public class Basic {
testEHC("9.1.1.2-2a", "9.1.1.2-12", false, false, 1, 1);
testEHC("9.1.1.2-12", "9.1.1.2-4", false, false, 1, 1);
- testEHC("27.16", "27.16+120", false, false, 1, 1);
+ testEHC("27.16", "27.16+120", false, false, -1, -1);
testEHC("10", "10-ea", false, false, 1, 1);
testEHC("10.1+1", "10.1-ea+1", false, false, 1, 1);
testEHC("10.0.1+22", "10.0.1+21", false, false, 1, 1);
@@ -152,7 +152,7 @@ public class Basic {
testEHC("9-internal", "9", false, false, -1, -1);
testEHC("9-ea+120", "9+120", false, false, -1, -1);
testEHC("9-ea+120", "9+120", false, false, -1, -1);
- testEHC("9+101", "9", false, false, -1, -1);
+ testEHC("9+101", "9", false, false, 1, 1);
testEHC("9+101", "9+102", false, false, -1, -1);
testEHC("1.9-ea", "9-ea", false, false, -1, -1);
diff --git a/jdk/test/java/lang/StackWalker/CallerSensitiveMethod/csm/jdk/test/CallerSensitiveTest.java b/jdk/test/java/lang/StackWalker/CallerSensitiveMethod/csm/jdk/test/CallerSensitiveTest.java
index c09c327ec3a..609616d9003 100644
--- a/jdk/test/java/lang/StackWalker/CallerSensitiveMethod/csm/jdk/test/CallerSensitiveTest.java
+++ b/jdk/test/java/lang/StackWalker/CallerSensitiveMethod/csm/jdk/test/CallerSensitiveTest.java
@@ -50,7 +50,7 @@ public class CallerSensitiveTest {
if (args.length > 0 && args[0].equals("sm")) {
sm = true;
PermissionCollection perms = new Permissions();
- perms.add(new StackFramePermission("retainClassReference"));
+ perms.add(new RuntimePermission("getStackWalkerWithClassReference"));
Policy.setPolicy(new Policy() {
@Override
public boolean implies(ProtectionDomain domain, Permission p) {
diff --git a/jdk/test/java/lang/StackWalker/GetCallerClassTest.java b/jdk/test/java/lang/StackWalker/GetCallerClassTest.java
index e3b96ee558a..9f1f3b0a2c0 100644
--- a/jdk/test/java/lang/StackWalker/GetCallerClassTest.java
+++ b/jdk/test/java/lang/StackWalker/GetCallerClassTest.java
@@ -55,7 +55,7 @@ public class GetCallerClassTest {
public static void main(String... args) throws Exception {
if (args.length > 0 && args[0].equals("sm")) {
PermissionCollection perms = new Permissions();
- perms.add(new StackFramePermission("retainClassReference"));
+ perms.add(new RuntimePermission("getStackWalkerWithClassReference"));
Policy.setPolicy(new Policy() {
@Override
public boolean implies(ProtectionDomain domain, Permission p) {
diff --git a/jdk/test/java/lang/StackWalker/stackwalk.policy b/jdk/test/java/lang/StackWalker/stackwalk.policy
index f768dbe6e96..fbcb6b358e1 100644
--- a/jdk/test/java/lang/StackWalker/stackwalk.policy
+++ b/jdk/test/java/lang/StackWalker/stackwalk.policy
@@ -1,4 +1,4 @@
grant {
- permission java.lang.StackFramePermission "retainClassReference";
+ permission java.lang.RuntimePermission "getStackWalkerWithClassReference";
};
diff --git a/jdk/test/java/lang/StackWalker/stackwalktest.policy b/jdk/test/java/lang/StackWalker/stackwalktest.policy
index b6d3d2a37e8..3f019364604 100644
--- a/jdk/test/java/lang/StackWalker/stackwalktest.policy
+++ b/jdk/test/java/lang/StackWalker/stackwalktest.policy
@@ -1,5 +1,5 @@
grant {
- permission java.lang.StackFramePermission "retainClassReference";
+ permission java.lang.RuntimePermission "getStackWalkerWithClassReference";
permission java.util.PropertyPermission "seed", "read";
};
diff --git a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java
index 7f6615934d7..a0cebab1093 100644
--- a/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java
+++ b/jdk/test/java/nio/channels/FileChannel/LoopingTruncate.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, 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
@@ -28,7 +28,7 @@
* @summary (fc) Infinite loop FileChannel.truncate
* @library /lib/testlibrary
* @build jdk.testlibrary.Utils
- * @run main/othervm LoopingTruncate
+ * @run main/othervm/timeout=300 LoopingTruncate
*/
import java.nio.ByteBuffer;
@@ -37,6 +37,7 @@ import java.nio.channels.ClosedByInterruptException;
import java.nio.file.Files;
import java.nio.file.Path;
import static java.nio.file.StandardOpenOption.*;
+import java.util.concurrent.TimeUnit;
import static jdk.testlibrary.Utils.adjustTimeout;
public class LoopingTruncate {
@@ -51,11 +52,21 @@ public class LoopingTruncate {
Path path = Files.createTempFile("LoopingTruncate.tmp", null);
try (FileChannel fc = FileChannel.open(path, CREATE, WRITE)) {
fc.position(FATEFUL_SIZE + 1L);
+ System.out.println(" Writing large file...");
+ long t0 = System.nanoTime();
fc.write(ByteBuffer.wrap(new byte[] {0}));
+ long t1 = System.nanoTime();
+ System.out.printf(" Wrote large file in %d ns (%d ms) %n",
+ t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0));
Thread th = new Thread(() -> {
try {
+ System.out.println(" Truncating large file...");
+ long t2 = System.nanoTime();
fc.truncate(FATEFUL_SIZE);
+ long t3 = System.nanoTime();
+ System.out.printf(" Truncated large file in %d ns (%d ms) %n",
+ t3 - t2, TimeUnit.NANOSECONDS.toMillis(t3 - t2));
} catch (ClosedByInterruptException ignore) {
} catch (Exception e) {
throw new RuntimeException(e);
diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java
index 135e13fef34..20e2deed79a 100644
--- a/jdk/test/java/nio/channels/FileChannel/Transfer.java
+++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java
@@ -29,7 +29,7 @@
* @library ..
* @library /lib/testlibrary/
* @build jdk.testlibrary.*
- * @run testng Transfer
+ * @run testng/timeout=300 Transfer
* @key randomness
*/
@@ -256,7 +256,13 @@ public class Transfer {
initTestFile(source, 10);
RandomAccessFile raf = new RandomAccessFile(source, "rw");
FileChannel fc = raf.getChannel();
+ out.println(" Writing large file...");
+ long t0 = System.nanoTime();
fc.write(ByteBuffer.wrap("Use the source!".getBytes()), testSize - 40);
+ long t1 = System.nanoTime();
+ out.printf(" Wrote large file in %d ns (%d ms) %n",
+ t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0));
+
fc.close();
raf.close();
@@ -310,8 +316,13 @@ public class Transfer {
long testSize = ((long)Integer.MAX_VALUE) * 2;
try {
+ out.println(" Writing large file...");
+ long t0 = System.nanoTime();
fc.write(ByteBuffer.wrap("Use the source!".getBytes()),
testSize - 40);
+ long t1 = System.nanoTime();
+ out.printf(" Wrote large file in %d ns (%d ms) %n",
+ t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0));
} catch (IOException e) {
// Can't set up the test, abort it
err.println("xferTest05 was aborted.");
@@ -444,12 +455,12 @@ public class Transfer {
RandomAccessFile raf = new RandomAccessFile(file, "rw");
FileChannel fc = raf.getChannel();
- out.println(" Creating large file...");
+ out.println(" Writing large file...");
long t0 = System.nanoTime();
try {
fc.write(ByteBuffer.wrap("0123456789012345".getBytes("UTF-8")), 6*G);
long t1 = System.nanoTime();
- out.printf(" Created large file in %d ns (%d ms) %n",
+ out.printf(" Wrote large file in %d ns (%d ms) %n",
t1 - t0, TimeUnit.NANOSECONDS.toMillis(t1 - t0));
} catch (IOException x) {
err.println(" Unable to create test file:" + x);
diff --git a/jdk/test/java/nio/channels/FileChannel/Transfers.java b/jdk/test/java/nio/channels/FileChannel/Transfers.java
index 33d95918c91..32c76166cdf 100644
--- a/jdk/test/java/nio/channels/FileChannel/Transfers.java
+++ b/jdk/test/java/nio/channels/FileChannel/Transfers.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2017, 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
@@ -26,6 +26,7 @@
* @summary Comprehensive test for FileChannel.transfer{From,To}
* @bug 4708120
* @author Mark Reinhold
+ * @run main/timeout=300 Transfers
*/
import java.io.*;
diff --git a/jdk/test/java/nio/channels/Selector/SelectAndClose.java b/jdk/test/java/nio/channels/Selector/SelectAndClose.java
index a545e945bc6..9c1673b7f40 100644
--- a/jdk/test/java/nio/channels/Selector/SelectAndClose.java
+++ b/jdk/test/java/nio/channels/Selector/SelectAndClose.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, 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
@@ -29,19 +29,22 @@
import java.nio.channels.*;
import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
public class SelectAndClose {
static Selector selector;
- static boolean awakened = false;
- static boolean closed = false;
+ static volatile boolean awakened = false;
+ static volatile boolean closed = false;
public static void main(String[] args) throws Exception {
selector = Selector.open();
// Create and start a selector in a separate thread.
+ final CountDownLatch selectLatch = new CountDownLatch(1);
new Thread(new Runnable() {
public void run() {
try {
+ selectLatch.countDown();
selector.select();
awakened = true;
} catch (IOException e) {
@@ -51,10 +54,11 @@ public class SelectAndClose {
}).start();
// Wait for above thread to get to select() before we call close.
- Thread.sleep(3000);
+ selectLatch.await();
+ Thread.sleep(2000);
// Try to close. This should wakeup select.
- new Thread(new Runnable() {
+ Thread closeThread = new Thread(new Runnable() {
public void run() {
try {
selector.close();
@@ -63,10 +67,11 @@ public class SelectAndClose {
System.err.println(e);
}
}
- }).start();
+ });
+ closeThread.start();
// Wait for select() to be awakened, which should be done by close.
- Thread.sleep(3000);
+ closeThread.join();
if (!awakened)
selector.wakeup();
diff --git a/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java b/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java
index 08cdfeb86dc..8a87e473a6f 100644
--- a/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java
+++ b/jdk/test/java/util/concurrent/tck/ForkJoinPool9Test.java
@@ -32,9 +32,14 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
-import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.ForkJoinTask;
+import java.util.concurrent.Future;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -53,29 +58,43 @@ public class ForkJoinPool9Test extends JSR166TestCase {
*/
public void testCommonPoolThreadContextClassLoader() throws Throwable {
if (!testImplementationDetails) return;
+
+ // Ensure common pool has at least one real thread
+ String prop = System.getProperty(
+ "java.util.concurrent.ForkJoinPool.common.parallelism");
+ if ("0".equals(prop)) return;
+
VarHandle CCL =
MethodHandles.privateLookupIn(Thread.class, MethodHandles.lookup())
.findVarHandle(Thread.class, "contextClassLoader", ClassLoader.class);
ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
boolean haveSecurityManager = (System.getSecurityManager() != null);
- CompletableFuture.runAsync(
- () -> {
- assertSame(systemClassLoader,
- Thread.currentThread().getContextClassLoader());
- assertSame(systemClassLoader,
- CCL.get(Thread.currentThread()));
- if (haveSecurityManager)
- assertThrows(
- SecurityException.class,
- () -> System.getProperty("foo"),
- () -> Thread.currentThread().setContextClassLoader(null));
-
- // TODO ?
-// if (haveSecurityManager
-// && Thread.currentThread().getClass().getSimpleName()
-// .equals("InnocuousForkJoinWorkerThread"))
-// assertThrows(SecurityException.class, /* ?? */);
- }).join();
+ CountDownLatch taskStarted = new CountDownLatch(1);
+ Runnable runInCommonPool = () -> {
+ taskStarted.countDown();
+ assertTrue(ForkJoinTask.inForkJoinPool());
+ assertSame(ForkJoinPool.commonPool(),
+ ForkJoinTask.getPool());
+ assertSame(systemClassLoader,
+ Thread.currentThread().getContextClassLoader());
+ assertSame(systemClassLoader,
+ CCL.get(Thread.currentThread()));
+ if (haveSecurityManager)
+ assertThrows(
+ SecurityException.class,
+ () -> System.getProperty("foo"),
+ () -> Thread.currentThread().setContextClassLoader(null));
+ // TODO ?
+// if (haveSecurityManager
+// && Thread.currentThread().getClass().getSimpleName()
+// .equals("InnocuousForkJoinWorkerThread"))
+// assertThrows(SecurityException.class, /* ?? */);
+ };
+ Future> f = ForkJoinPool.commonPool().submit(runInCommonPool);
+ // Ensure runInCommonPool is truly running in the common pool,
+ // by giving this thread no opportunity to "help" on get().
+ assertTrue(taskStarted.await(LONG_DELAY_MS, MILLISECONDS));
+ assertNull(f.get());
}
}
diff --git a/jdk/test/jdk/modules/etc/JdkQualifiedExportTest.java b/jdk/test/jdk/modules/etc/JdkQualifiedExportTest.java
new file mode 100644
index 00000000000..0948f420f1a
--- /dev/null
+++ b/jdk/test/jdk/modules/etc/JdkQualifiedExportTest.java
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2017, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8176537
+ * @summary Check JDK modules have no qualified export to any upgradeable module
+ * @modules java.base/jdk.internal.module
+ * @run main JdkQualifiedExportTest
+ */
+
+import jdk.internal.module.ModuleHashes;
+import jdk.internal.module.ModuleInfo;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.lang.module.ModuleDescriptor;
+import java.lang.module.ModuleDescriptor.Exports;
+import java.lang.module.ModuleDescriptor.Opens;
+import java.lang.module.ModuleFinder;
+import java.lang.module.ModuleReference;
+import java.lang.reflect.Module;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+public class JdkQualifiedExportTest {
+ public static void main(String... args) {
+ // check all system modules
+ ModuleFinder.ofSystem().findAll()
+ .stream()
+ .map(ModuleReference::descriptor)
+ .sorted(Comparator.comparing(ModuleDescriptor::name))
+ .forEach(JdkQualifiedExportTest::check);
+ }
+
+ static void check(ModuleDescriptor md) {
+ // skip checking if this is an upgradeable module
+ if (!HashedModules.contains(md.name())) {
+ return;
+ }
+
+ checkExports(md);
+ checkOpens(md);
+ }
+
+ static Set