| other |
* The Unicode characters that are not in the US-ASCII character set,
* are not control characters (according to the {@link
* java.lang.Character#isISOControl(char) Character.isISOControl}
diff --git a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html
index f4bf1243681..003749ba7f2 100644
--- a/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html
+++ b/jdk/src/java.base/share/classes/java/net/doc-files/net-properties.html
@@ -1,5 +1,6 @@
+
-
Networking Properties
-Networking Properties
-There are a few standard system properties used to
+ Networking Properties
+There are a few standard system properties used to
alter the mechanisms and behavior of the various classes of the
java.net package. Some are checked only once at startup of the VM,
and therefore are best set using the -D option of the java command,
@@ -39,7 +39,7 @@ the
+
IPv4 / IPv6
Both of these properties are checked only once, at startup.
-
+
Proxies
A proxy server allows indirect connection to network services and
is used mainly for security (to get through firewalls) and
@@ -155,7 +155,7 @@ of proxies.
globally through their user interface). Note that this property is
checked only once at startup.
-
+
Misc HTTP properties
All these properties are checked only once at startup.
-
+
Address Cache
The java.net package, when doing name resolution, uses an address
cache for both security and performance reasons. Any address
diff --git a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java
index b38bdea058a..d29ae67590f 100644
--- a/jdk/src/java.base/share/classes/java/nio/channels/package-info.java
+++ b/jdk/src/java.base/share/classes/java/nio/channels/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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,33 +28,46 @@
* performing I/O operations, such as files and sockets; defines selectors, for
* multiplexed, non-blocking I/O operations.
*
- *
+ *
*
- *
- * | Channels | Description |
- * | {@link java.nio.channels.Channel} |
+ *
+ * Lists channels and their descriptions
+ * | Channels |
+ * Description |
+ * | {@link java.nio.channels.Channel} |
* A nexus for I/O operations |
- * | {@link java.nio.channels.ReadableByteChannel} |
+ * |
+ * {@link java.nio.channels.ReadableByteChannel} |
* Can read into a buffer |
- * | {@link java.nio.channels.ScatteringByteChannel} |
+ * |
+ * {@link java.nio.channels.ScatteringByteChannel} |
* Can read into a sequence of buffers |
- * | {@link java.nio.channels.WritableByteChannel} |
+ * |
+ * {@link java.nio.channels.WritableByteChannel} |
* Can write from a buffer |
- * | {@link java.nio.channels.GatheringByteChannel} |
+ * |
+ * {@link java.nio.channels.GatheringByteChannel} |
* Can write from a sequence of buffers |
- * | {@link java.nio.channels.ByteChannel} |
+ * |
+ * {@link java.nio.channels.ByteChannel} |
* Can read/write to/from a buffer |
- * | {@link java.nio.channels.SeekableByteChannel} |
- * A {@code ByteChannel} connected to an entity that contains a variable-length sequence of bytes |
- * | {@link java.nio.channels.AsynchronousChannel} |
+ * |
+ * {@link java.nio.channels.SeekableByteChannel} |
+ * A {@code ByteChannel} connected to an entity that contains a variable-length
+ * sequence of bytes |
+ * |
+ * {@link java.nio.channels.AsynchronousChannel} |
* Supports asynchronous I/O operations. |
- * | {@link java.nio.channels.AsynchronousByteChannel} |
+ * |
+ * {@link java.nio.channels.AsynchronousByteChannel} |
* Can read and write bytes asynchronously |
- * | {@link java.nio.channels.NetworkChannel} |
+ * |
+ * {@link java.nio.channels.NetworkChannel} |
* A channel to a network socket |
- * | {@link java.nio.channels.MulticastChannel} |
+ * |
+ * {@link java.nio.channels.MulticastChannel} |
* Can join Internet Protocol (IP) multicast groups |
- * | {@link java.nio.channels.Channels} |
+ * | {@link java.nio.channels.Channels} |
* Utility methods for channel/stream interoperation |
*
*
@@ -109,13 +122,19 @@
* be constructed that uses a given charset to encode characters into bytes and
* write them to a given writable byte channel.
*
- *
- * | File channels | Description |
- * | {@link java.nio.channels.FileChannel} |
+ *
+ *
+ * Lists file channels and their descriptions
+ * | File channels |
+ * Description |
+ * |
+ * {@link java.nio.channels.FileChannel} |
* Reads, writes, maps, and manipulates files |
- * | {@link java.nio.channels.FileLock} |
+ * |
+ * {@link java.nio.channels.FileLock} |
* A lock on a (region of a) file |
- * | {@link java.nio.MappedByteBuffer} |
+ * |
+ * {@link java.nio.MappedByteBuffer} |
* A direct byte buffer mapped to a region of a file |
*
*
@@ -136,27 +155,35 @@
* file channel connected to the same underlying file as the {@link java.io}
* class.
*
- *
- *
- * | Multiplexed, non-blocking I/O | Description |
- * | {@link java.nio.channels.SelectableChannel} |
+ *
+ *
+ *
+ * Lists multiplexed, non-blocking channels and their descriptions
+ * | Multiplexed, non-blocking I/O |
+ * Description |
+ * | {@link java.nio.channels.SelectableChannel} |
* A channel that can be multiplexed |
- * | {@link java.nio.channels.DatagramChannel} |
+ * |
+ * {@link java.nio.channels.DatagramChannel} |
* A channel to a datagram-oriented socket |
- * | {@link java.nio.channels.Pipe.SinkChannel} |
+ * |
+ * {@link java.nio.channels.Pipe.SinkChannel} |
* The write end of a pipe |
- * | {@link java.nio.channels.Pipe.SourceChannel} |
+ * |
+ * {@link java.nio.channels.Pipe.SourceChannel} |
* The read end of a pipe |
- * | {@link java.nio.channels.ServerSocketChannel} |
+ * |
+ * {@link java.nio.channels.ServerSocketChannel} |
* A channel to a stream-oriented listening socket |
- * | {@link java.nio.channels.SocketChannel} |
+ * |
+ * {@link java.nio.channels.SocketChannel} |
* A channel for a stream-oriented connecting socket |
- * | {@link java.nio.channels.Selector} |
+ * | {@link java.nio.channels.Selector} |
* A multiplexor of selectable channels |
- * | {@link java.nio.channels.SelectionKey} |
+ * | {@link java.nio.channels.SelectionKey} |
* A token representing the registration of a channel
* with a selector |
- * | {@link java.nio.channels.Pipe} |
+ * | {@link java.nio.channels.Pipe} |
* Two channels that form a unidirectional pipe |
*
*
@@ -222,19 +249,27 @@
* directly; custom channel classes should extend the appropriate {@link
* java.nio.channels.SelectableChannel} subclasses defined in this package.
*
- *
+ *
*
- *
- * | Asynchronous I/O | Description |
- * | {@link java.nio.channels.AsynchronousFileChannel} |
+ *
+ *
+ * Lists asynchronous channels and their descriptions
+ * |
+ * Asynchronous I/O | Description |
+ * |
+ * {@link java.nio.channels.AsynchronousFileChannel} |
* An asynchronous channel for reading, writing, and manipulating a file |
- * | {@link java.nio.channels.AsynchronousSocketChannel} |
+ * |
+ * {@link java.nio.channels.AsynchronousSocketChannel} |
* An asynchronous channel to a stream-oriented connecting socket |
- * | {@link java.nio.channels.AsynchronousServerSocketChannel} |
+ * |
+ * {@link java.nio.channels.AsynchronousServerSocketChannel} |
* An asynchronous channel to a stream-oriented listening socket |
- * | {@link java.nio.channels.CompletionHandler} |
+ * |
+ * {@link java.nio.channels.CompletionHandler} |
* A handler for consuming the result of an asynchronous operation |
- * | {@link java.nio.channels.AsynchronousChannelGroup} |
+ * |
+ * {@link java.nio.channels.AsynchronousChannelGroup} |
* A grouping of asynchronous channels for the purpose of resource sharing |
*
*
@@ -277,7 +312,6 @@
* so that sophisticated users can take advantage of operating-system-specific
* asynchronous I/O mechanisms when very high performance is required.
*
- *
* Unless otherwise noted, passing a {@code null} argument to a constructor
* or method in any class or interface in this package will cause a {@link
* java.lang.NullPointerException NullPointerException} to be thrown.
diff --git a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java
index 9d93a710a25..80141dc8b6a 100644
--- a/jdk/src/java.base/share/classes/java/nio/charset/package-info.java
+++ b/jdk/src/java.base/share/classes/java/nio/charset/package-info.java
@@ -27,17 +27,19 @@
* Defines charsets, decoders, and encoders, for translating between
* bytes and Unicode characters.
*
- *
- * | Class name | Description |
- * | {@link java.nio.charset.Charset} |
+ *
+ * Summary of charsets, decoders, and encoders in this package
+ * | Class name |
+ * | DescriptiPath
+ * |
|---|
| {@link java.nio.charset.Charset} |
* A named mapping between characters and bytes |
- * | {@link java.nio.charset.CharsetDecoder} |
+ * | {@link java.nio.charset.CharsetDecoder} |
* Decodes bytes into characters |
- * | {@link java.nio.charset.CharsetEncoder} |
+ * | {@link java.nio.charset.CharsetEncoder} |
* Encodes characters into bytes |
- * | {@link java.nio.charset.CoderResult} |
+ * | {@link java.nio.charset.CoderResult} |
* Describes coder results |
- * | {@link java.nio.charset.CodingErrorAction} |
+ * | {@link java.nio.charset.CodingErrorAction} |
* Describes actions to take when coding errors are detected |
*
*
diff --git a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java
index 1dd20f627c7..11f5d6e2720 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/attribute/package-info.java
@@ -26,25 +26,41 @@
/**
* Interfaces and classes providing access to file and file system attributes.
*
- *
- * | Attribute views | Description |
- * | {@link java.nio.file.attribute.AttributeView} |
+ *
+ * Attribute views
+ * | Attribute views |
+ * Description |
+ * | {@link java.nio.file.attribute.AttributeView} |
* Can read or update non-opaque values associated with objects in a file system |
- * | {@link java.nio.file.attribute.FileAttributeView} |
+ * |
+ * {@link java.nio.file.attribute.FileAttributeView} |
* Can read or update file attributes |
- * | {@link java.nio.file.attribute.BasicFileAttributeView} |
+ * |
+ *
+ * {@link java.nio.file.attribute.BasicFileAttributeView} |
* Can read or update a basic set of file attributes |
- * | {@link java.nio.file.attribute.PosixFileAttributeView} |
+ * |
+ *
+ * {@link java.nio.file.attribute.PosixFileAttributeView} |
* Can read or update POSIX defined file attributes |
- * | {@link java.nio.file.attribute.DosFileAttributeView} |
+ * |
+ *
+ * {@link java.nio.file.attribute.DosFileAttributeView} |
* Can read or update FAT file attributes |
- * | {@link java.nio.file.attribute.FileOwnerAttributeView} |
+ * |
+ *
+ * {@link java.nio.file.attribute.FileOwnerAttributeView} |
* Can read or update the owner of a file |
- * | {@link java.nio.file.attribute.AclFileAttributeView} |
+ * |
+ *
+ * {@link java.nio.file.attribute.AclFileAttributeView} |
* Can read or update Access Control Lists |
- * | {@link java.nio.file.attribute.UserDefinedFileAttributeView} |
+ * |
+ *
+ * {@link java.nio.file.attribute.UserDefinedFileAttributeView} |
* Can read or update user-defined file attributes |
- * | {@link java.nio.file.attribute.FileStoreAttributeView} |
+ * |
+ * {@link java.nio.file.attribute.FileStoreAttributeView} |
* Can read or update file system attributes |
*
*
diff --git a/jdk/src/java.base/share/classes/java/nio/file/package-info.java b/jdk/src/java.base/share/classes/java/nio/file/package-info.java
index 556df2b8c6a..611138eef8e 100644
--- a/jdk/src/java.base/share/classes/java/nio/file/package-info.java
+++ b/jdk/src/java.base/share/classes/java/nio/file/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -33,7 +33,7 @@
* package is used by service provider implementors wishing to extend the
* platform default provider, or to construct other provider implementations.
*
- *
+ *
* Many operating systems and file systems support for symbolic links.
* A symbolic link is a special file that serves as a reference to another file.
* For the most part, symbolic links are transparent to applications and
@@ -45,7 +45,7 @@
* that are semantically close but support for these other types of links is
* not included in this package.
*
- *
+ *
* The {@link java.io.File} class defines the {@link java.io.File#toPath
* toPath} method to construct a {@link java.nio.file.Path} by converting
* the abstract path represented by the {@code java.io.File} object. The resulting
@@ -65,7 +65,7 @@
* or on some other machine. The exact nature of any such inconsistencies are
* system-dependent and are therefore unspecified.
*
- *
+ *
* The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
* java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
* to require that updates to the file are written synchronously to the underlying
diff --git a/jdk/src/java.base/share/classes/java/nio/package-info.java b/jdk/src/java.base/share/classes/java/nio/package-info.java
index b36faeac3c6..9fa17c945e0 100644
--- a/jdk/src/java.base/share/classes/java/nio/package-info.java
+++ b/jdk/src/java.base/share/classes/java/nio/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -60,30 +60,33 @@
* the contents of which can be used to extend the platform's default
* implementations or to construct alternative implementations.
*
- *
+ *
*
- *
- * | Buffers | Description |
- * | {@link java.nio.Buffer} |
+ *
+ * Description of the various buffers
+ * | Buffers |
+ * Description |
+ * | {@link java.nio.Buffer} |
* Position, limit, and capacity;
* clear, flip, rewind, and mark/reset |
- * | {@link java.nio.ByteBuffer} |
+ * | {@link java.nio.ByteBuffer} |
* Get/put, compact, views; allocate, wrap |
- * | {@link java.nio.MappedByteBuffer} |
+ * |
+ * {@link java.nio.MappedByteBuffer} |
* A byte buffer mapped to a file |
- * | {@link java.nio.CharBuffer} |
+ * | {@link java.nio.CharBuffer} |
* Get/put, compact; allocate, wrap |
- * | {@link java.nio.DoubleBuffer} |
+ * | {@link java.nio.DoubleBuffer} |
* ' ' |
- * | {@link java.nio.FloatBuffer} |
+ * | {@link java.nio.FloatBuffer} |
* ' ' |
- * | {@link java.nio.IntBuffer} |
+ * | {@link java.nio.IntBuffer} |
* ' ' |
- * | {@link java.nio.LongBuffer} |
+ * | {@link java.nio.LongBuffer} |
* ' ' |
- * | {@link java.nio.ShortBuffer} |
+ * | {@link java.nio.ShortBuffer} |
* ' ' |
- * | {@link java.nio.ByteOrder} |
+ * | {@link java.nio.ByteOrder} |
* Typesafe enumeration for byte orders |
*
*
diff --git a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java
index e15b3906dab..eb60950cc1e 100644
--- a/jdk/src/java.base/share/classes/java/security/AccessControlContext.java
+++ b/jdk/src/java.base/share/classes/java/security/AccessControlContext.java
@@ -74,6 +74,7 @@ import sun.security.util.SecurityConstants;
* @see AccessController
*
* @author Roland Schemers
+ * @since 1.2
*/
public final class AccessControlContext {
diff --git a/jdk/src/java.base/share/classes/java/security/AccessControlException.java b/jdk/src/java.base/share/classes/java/security/AccessControlException.java
index a4f2a7803ad..3d654eebea4 100644
--- a/jdk/src/java.base/share/classes/java/security/AccessControlException.java
+++ b/jdk/src/java.base/share/classes/java/security/AccessControlException.java
@@ -38,6 +38,7 @@ package java.security;
*
* @author Li Gong
* @author Roland Schemers
+ * @since 1.2
*/
public class AccessControlException extends SecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/AccessController.java b/jdk/src/java.base/share/classes/java/security/AccessController.java
index b37b476efdd..e41f40b46f1 100644
--- a/jdk/src/java.base/share/classes/java/security/AccessController.java
+++ b/jdk/src/java.base/share/classes/java/security/AccessController.java
@@ -259,6 +259,7 @@ import jdk.internal.reflect.Reflection;
*
* @author Li Gong
* @author Roland Schemers
+ * @since 1.2
*/
public final class AccessController {
diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java
index 8694b603c07..c67fc37eadb 100644
--- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java
+++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java
@@ -61,11 +61,17 @@ import java.util.Objects;
*
*
* In case the client does not explicitly initialize the
- * AlgorithmParameterGenerator
- * (via a call to an {@code init} method), each provider must supply (and
- * document) a default initialization. For example, the Sun provider uses a
- * default modulus prime size of 1024 bits for the generation of DSA
- * parameters.
+ * AlgorithmParameterGenerator (via a call to an {@code init} method),
+ * each provider must supply (and document) a default initialization.
+ * See the Keysize Restriction sections of the
+ *
+ * JDK Providers
+ * document for information on the AlgorithmParameterGenerator defaults
+ * used by JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * AlgorithmParameterGenerator instead of relying on provider-specific defaults.
*
* Every implementation of the Java platform is required to support the
* following standard {@code AlgorithmParameterGenerator} algorithms and
diff --git a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java
index 721fb52ac18..ece70f65f35 100644
--- a/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java
+++ b/jdk/src/java.base/share/classes/java/security/AlgorithmParameterGeneratorSpi.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -39,8 +39,15 @@ import java.security.spec.AlgorithmParameterSpec;
* In case the client does not explicitly initialize the
* AlgorithmParameterGenerator (via a call to an {@code engineInit}
* method), each provider must supply (and document) a default initialization.
- * For example, the Sun provider uses a default modulus prime size of 1024
- * bits for the generation of DSA parameters.
+ * See the Keysize Restriction sections of the
+ *
+ * JDK Providers
+ * document for information on the AlgorithmParameterGenerator defaults
+ * used by JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * AlgorithmParameterGenerator instead of relying on provider-specific defaults.
*
* @author Jan Luehe
*
diff --git a/jdk/src/java.base/share/classes/java/security/AllPermission.java b/jdk/src/java.base/share/classes/java/security/AllPermission.java
index fcda7ce0bc1..c6e4629167c 100644
--- a/jdk/src/java.base/share/classes/java/security/AllPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/AllPermission.java
@@ -51,6 +51,7 @@ import sun.security.util.SecurityConstants;
*
*
* @author Roland Schemers
+ * @since 1.2
*
* @serial exclude
*/
diff --git a/jdk/src/java.base/share/classes/java/security/BasicPermission.java b/jdk/src/java.base/share/classes/java/security/BasicPermission.java
index fb5f2a260a3..906d6b91349 100644
--- a/jdk/src/java.base/share/classes/java/security/BasicPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/BasicPermission.java
@@ -62,6 +62,7 @@ import java.util.concurrent.ConcurrentHashMap;
*
* @author Marianne Mueller
* @author Roland Schemers
+ * @since 1.2
*/
public abstract class BasicPermission extends Permission
diff --git a/jdk/src/java.base/share/classes/java/security/Certificate.java b/jdk/src/java.base/share/classes/java/security/Certificate.java
index 2d3db8f0383..d56446925b1 100644
--- a/jdk/src/java.base/share/classes/java/security/Certificate.java
+++ b/jdk/src/java.base/share/classes/java/security/Certificate.java
@@ -56,6 +56,7 @@ import java.util.Date;
* the certificate and satisfy itself of its validity.
*
* @author Benjamin Renaud
+ * @since 1.1
* @deprecated A new certificate handling package is created in the Java platform.
* This Certificate interface is entirely deprecated and
* is here to allow for a smooth transition to the new
diff --git a/jdk/src/java.base/share/classes/java/security/CodeSource.java b/jdk/src/java.base/share/classes/java/security/CodeSource.java
index f710fe31fc9..93d9983f12a 100644
--- a/jdk/src/java.base/share/classes/java/security/CodeSource.java
+++ b/jdk/src/java.base/share/classes/java/security/CodeSource.java
@@ -44,6 +44,7 @@ import sun.net.util.URLUtil;
*
* @author Li Gong
* @author Roland Schemers
+ * @since 1.2
*/
public class CodeSource implements java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/DigestException.java b/jdk/src/java.base/share/classes/java/security/DigestException.java
index 2327c982845..f2755304afc 100644
--- a/jdk/src/java.base/share/classes/java/security/DigestException.java
+++ b/jdk/src/java.base/share/classes/java/security/DigestException.java
@@ -29,6 +29,7 @@ package java.security;
* This is the generic Message Digest exception.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class DigestException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/DigestInputStream.java b/jdk/src/java.base/share/classes/java/security/DigestInputStream.java
index 747537df253..a76ebdacdfc 100644
--- a/jdk/src/java.base/share/classes/java/security/DigestInputStream.java
+++ b/jdk/src/java.base/share/classes/java/security/DigestInputStream.java
@@ -59,6 +59,7 @@ import java.io.ByteArrayInputStream;
* @see DigestOutputStream
*
* @author Benjamin Renaud
+ * @since 1.2
*/
public class DigestInputStream extends FilterInputStream {
diff --git a/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java b/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java
index 51db133a5f6..a0a44e26f10 100644
--- a/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/security/DigestOutputStream.java
@@ -51,6 +51,7 @@ import java.io.ByteArrayOutputStream;
* @see DigestInputStream
*
* @author Benjamin Renaud
+ * @since 1.2
*/
public class DigestOutputStream extends FilterOutputStream {
diff --git a/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java b/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java
index dc9ea06ecce..69ee8ead305 100644
--- a/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java
+++ b/jdk/src/java.base/share/classes/java/security/GeneralSecurityException.java
@@ -31,6 +31,7 @@ package java.security;
* security-related exception classes that extend from it.
*
* @author Jan Luehe
+ * @since 1.2
*/
public class GeneralSecurityException extends Exception {
diff --git a/jdk/src/java.base/share/classes/java/security/Guard.java b/jdk/src/java.base/share/classes/java/security/Guard.java
index abafb588659..f64a0d9f275 100644
--- a/jdk/src/java.base/share/classes/java/security/Guard.java
+++ b/jdk/src/java.base/share/classes/java/security/Guard.java
@@ -38,6 +38,7 @@ package java.security;
*
* @author Roland Schemers
* @author Li Gong
+ * @since 1.2
*/
public interface Guard {
diff --git a/jdk/src/java.base/share/classes/java/security/GuardedObject.java b/jdk/src/java.base/share/classes/java/security/GuardedObject.java
index a275ddf043e..a2bf3f758e7 100644
--- a/jdk/src/java.base/share/classes/java/security/GuardedObject.java
+++ b/jdk/src/java.base/share/classes/java/security/GuardedObject.java
@@ -44,6 +44,7 @@ package java.security;
*
* @author Roland Schemers
* @author Li Gong
+ * @since 1.2
*/
public class GuardedObject implements java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/Identity.java b/jdk/src/java.base/share/classes/java/security/Identity.java
index d091b942e26..4d79e2d751a 100644
--- a/jdk/src/java.base/share/classes/java/security/Identity.java
+++ b/jdk/src/java.base/share/classes/java/security/Identity.java
@@ -51,6 +51,7 @@ import java.util.*;
* @see Principal
*
* @author Benjamin Renaud
+ * @since 1.1
* @deprecated This class is no longer used. Its functionality has been
* replaced by {@code java.security.KeyStore}, the
* {@code java.security.cert} package, and
diff --git a/jdk/src/java.base/share/classes/java/security/IdentityScope.java b/jdk/src/java.base/share/classes/java/security/IdentityScope.java
index 107fe0861ad..5b6ec8212f7 100644
--- a/jdk/src/java.base/share/classes/java/security/IdentityScope.java
+++ b/jdk/src/java.base/share/classes/java/security/IdentityScope.java
@@ -55,6 +55,7 @@ import java.util.Properties;
* @see Key
*
* @author Benjamin Renaud
+ * @since 1.1
*
* @deprecated This class is no longer used. Its functionality has been
* replaced by {@code java.security.KeyStore}, the
diff --git a/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java b/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java
index 2f7568713c7..5349796b150 100644
--- a/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java
+++ b/jdk/src/java.base/share/classes/java/security/InvalidKeyException.java
@@ -31,6 +31,7 @@ package java.security;
* length, uninitialized, etc).
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class InvalidKeyException extends KeyException {
diff --git a/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java b/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java
index a095f90de36..18d413eba39 100644
--- a/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java
+++ b/jdk/src/java.base/share/classes/java/security/InvalidParameterException.java
@@ -31,6 +31,7 @@ package java.security;
* to a method.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class InvalidParameterException extends IllegalArgumentException {
diff --git a/jdk/src/java.base/share/classes/java/security/Key.java b/jdk/src/java.base/share/classes/java/security/Key.java
index 0f8e84e718e..dab747eb403 100644
--- a/jdk/src/java.base/share/classes/java/security/Key.java
+++ b/jdk/src/java.base/share/classes/java/security/Key.java
@@ -97,6 +97,7 @@ package java.security;
* @see Signer
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public interface Key extends java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/KeyException.java b/jdk/src/java.base/share/classes/java/security/KeyException.java
index 59cdd6f3ab5..b8b87d9516e 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyException.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyException.java
@@ -33,6 +33,7 @@ package java.security;
* @see KeyManagementException
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class KeyException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/KeyManagementException.java b/jdk/src/java.base/share/classes/java/security/KeyManagementException.java
index be212b9fdc1..fe1ab3eda94 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyManagementException.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyManagementException.java
@@ -38,6 +38,7 @@ package java.security;
*
*
* @author Benjamin Renaud
+ * @since 1.1
*
* @see Key
* @see KeyException
diff --git a/jdk/src/java.base/share/classes/java/security/KeyPair.java b/jdk/src/java.base/share/classes/java/security/KeyPair.java
index 6147a16aa59..1d9e1640553 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyPair.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyPair.java
@@ -36,6 +36,7 @@ import java.util.*;
* @see PrivateKey
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public final class KeyPair implements java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java
index b2f87720e80..fba444ebe56 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyPairGenerator.java
@@ -95,8 +95,15 @@ import sun.security.util.Debug;
* In case the client does not explicitly initialize the KeyPairGenerator
* (via a call to an {@code initialize} method), each provider must
* supply (and document) a default initialization.
- * For example, the Sun provider uses a default modulus size (keysize)
- * of 1024 bits for DSA key pairs.
+ * See the Keysize Restriction sections of the
+ *
+ * JDK Providers
+ * document for information on the KeyPairGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyPairGenerator instead of relying on provider-specific defaults.
*
* Note that this class is abstract and extends from
* {@code KeyPairGeneratorSpi} for historical reasons.
@@ -121,6 +128,7 @@ import sun.security.util.Debug;
* other algorithms are supported.
*
* @author Benjamin Renaud
+ * @since 1.1
*
* @see java.security.spec.AlgorithmParameterSpec
*/
diff --git a/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java b/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java
index dfe8c04218d..85f02b2ad86 100644
--- a/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java
+++ b/jdk/src/java.base/share/classes/java/security/KeyPairGeneratorSpi.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -39,10 +39,18 @@ import java.security.spec.AlgorithmParameterSpec;
* In case the client does not explicitly initialize the KeyPairGenerator
* (via a call to an {@code initialize} method), each provider must
* supply (and document) a default initialization.
- * For example, the Sun provider uses a default modulus size (keysize)
- * of 1024 bits.
+ * See the Keysize Restriction sections of the
+ *
+ * JDK Providers
+ * document for information on the KeyPairGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyPairGenerator instead of relying on provider-specific defaults.
*
* @author Benjamin Renaud
+ * @since 1.2
*
*
* @see KeyPairGenerator
diff --git a/jdk/src/java.base/share/classes/java/security/MessageDigest.java b/jdk/src/java.base/share/classes/java/security/MessageDigest.java
index 14eb6d6e7fe..be163c179f9 100644
--- a/jdk/src/java.base/share/classes/java/security/MessageDigest.java
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigest.java
@@ -96,6 +96,7 @@ import javax.crypto.SecretKey;
* other algorithms are supported.
*
* @author Benjamin Renaud
+ * @since 1.1
*
* @see DigestInputStream
* @see DigestOutputStream
diff --git a/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java b/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java
index 0d5ace1f7bf..699e8c25e72 100644
--- a/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java
+++ b/jdk/src/java.base/share/classes/java/security/MessageDigestSpi.java
@@ -43,6 +43,7 @@ import sun.security.jca.JCAUtil;
* Implementations are free to implement the Cloneable interface.
*
* @author Benjamin Renaud
+ * @since 1.2
*
*
* @see MessageDigest
diff --git a/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java b/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java
index 951e44e41dc..24455d31064 100644
--- a/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java
+++ b/jdk/src/java.base/share/classes/java/security/NoSuchAlgorithmException.java
@@ -30,6 +30,7 @@ package java.security;
* requested but is not available in the environment.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class NoSuchAlgorithmException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java b/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java
index 9874adb145e..e2f9265be2a 100644
--- a/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java
+++ b/jdk/src/java.base/share/classes/java/security/NoSuchProviderException.java
@@ -30,6 +30,7 @@ package java.security;
* requested but is not available in the environment.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class NoSuchProviderException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/Permission.java b/jdk/src/java.base/share/classes/java/security/Permission.java
index 088f97c35a6..0eb0496ce3b 100644
--- a/jdk/src/java.base/share/classes/java/security/Permission.java
+++ b/jdk/src/java.base/share/classes/java/security/Permission.java
@@ -60,6 +60,7 @@ package java.security;
*
* @author Marianne Mueller
* @author Roland Schemers
+ * @since 1.2
*/
public abstract class Permission implements Guard, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/PermissionCollection.java b/jdk/src/java.base/share/classes/java/security/PermissionCollection.java
index 1aa41cab022..ca15210b177 100644
--- a/jdk/src/java.base/share/classes/java/security/PermissionCollection.java
+++ b/jdk/src/java.base/share/classes/java/security/PermissionCollection.java
@@ -91,6 +91,7 @@ import java.util.stream.StreamSupport;
*
*
* @author Roland Schemers
+ * @since 1.2
*/
public abstract class PermissionCollection implements java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/Permissions.java b/jdk/src/java.base/share/classes/java/security/Permissions.java
index 6bb5fa1a445..fa37fcb4698 100644
--- a/jdk/src/java.base/share/classes/java/security/Permissions.java
+++ b/jdk/src/java.base/share/classes/java/security/Permissions.java
@@ -75,6 +75,7 @@ import java.io.IOException;
*
* @author Marianne Mueller
* @author Roland Schemers
+ * @since 1.2
*
* @serial exclude
*/
diff --git a/jdk/src/java.base/share/classes/java/security/Policy.java b/jdk/src/java.base/share/classes/java/security/Policy.java
index bad4f522367..54663a5a0f8 100644
--- a/jdk/src/java.base/share/classes/java/security/Policy.java
+++ b/jdk/src/java.base/share/classes/java/security/Policy.java
@@ -78,6 +78,7 @@ import sun.security.util.SecurityConstants;
*
* @author Roland Schemers
* @author Gary Ellison
+ * @since 1.2
* @see java.security.Provider
* @see java.security.ProtectionDomain
* @see java.security.Permission
diff --git a/jdk/src/java.base/share/classes/java/security/Principal.java b/jdk/src/java.base/share/classes/java/security/Principal.java
index db1e7d5fd02..40ee260bca9 100644
--- a/jdk/src/java.base/share/classes/java/security/Principal.java
+++ b/jdk/src/java.base/share/classes/java/security/Principal.java
@@ -35,6 +35,7 @@ import javax.security.auth.Subject;
* @see java.security.cert.X509Certificate
*
* @author Li Gong
+ * @since 1.1
*/
public interface Principal {
diff --git a/jdk/src/java.base/share/classes/java/security/PrivateKey.java b/jdk/src/java.base/share/classes/java/security/PrivateKey.java
index 7d8a7ea7041..0bc933bd901 100644
--- a/jdk/src/java.base/share/classes/java/security/PrivateKey.java
+++ b/jdk/src/java.base/share/classes/java/security/PrivateKey.java
@@ -54,6 +54,7 @@ package java.security;
*
* @author Benjamin Renaud
* @author Josh Bloch
+ * @since 1.1
*/
public interface PrivateKey extends Key, javax.security.auth.Destroyable {
diff --git a/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java b/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java
index b993cea4d2f..fec7a37d9ba 100644
--- a/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java
+++ b/jdk/src/java.base/share/classes/java/security/PrivilegedAction.java
@@ -34,6 +34,7 @@ package java.security;
* throw checked exceptions must use {@code PrivilegedExceptionAction}
* instead.
*
+ * @since 1.2
* @see AccessController
* @see AccessController#doPrivileged(PrivilegedAction)
* @see PrivilegedExceptionAction
diff --git a/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java b/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java
index 2de69698599..ebc12e74e0b 100644
--- a/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java
+++ b/jdk/src/java.base/share/classes/java/security/PrivilegedActionException.java
@@ -43,6 +43,7 @@ package java.security;
* cause, and may be accessed via the {@link Throwable#getCause()}
* method, as well as the aforementioned "legacy method."
*
+ * @since 1.2
* @see PrivilegedExceptionAction
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
* @see AccessController#doPrivileged(PrivilegedExceptionAction,AccessControlContext)
diff --git a/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java b/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java
index 59a9ba7dc18..35b9abfe354 100644
--- a/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java
+++ b/jdk/src/java.base/share/classes/java/security/PrivilegedExceptionAction.java
@@ -35,6 +35,7 @@ package java.security;
* computations that do not throw
* checked exceptions should use {@code PrivilegedAction} instead.
*
+ * @since 1.2
* @see AccessController
* @see AccessController#doPrivileged(PrivilegedExceptionAction)
* @see AccessController#doPrivileged(PrivilegedExceptionAction,
diff --git a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java
index 1a9ac151a70..365096f619a 100644
--- a/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java
+++ b/jdk/src/java.base/share/classes/java/security/ProtectionDomain.java
@@ -59,6 +59,7 @@ import sun.security.util.SecurityConstants;
* @author Li Gong
* @author Roland Schemers
* @author Gary Ellison
+ * @since 1.2
*/
public class ProtectionDomain {
diff --git a/jdk/src/java.base/share/classes/java/security/Provider.java b/jdk/src/java.base/share/classes/java/security/Provider.java
index cc5313e2a19..f17cfca932a 100644
--- a/jdk/src/java.base/share/classes/java/security/Provider.java
+++ b/jdk/src/java.base/share/classes/java/security/Provider.java
@@ -102,6 +102,7 @@ import java.util.function.Function;
*
* @author Benjamin Renaud
* @author Andreas Sterbenz
+ * @since 1.1
*/
public abstract class Provider extends Properties {
diff --git a/jdk/src/java.base/share/classes/java/security/ProviderException.java b/jdk/src/java.base/share/classes/java/security/ProviderException.java
index b372ee75752..48c3638a524 100644
--- a/jdk/src/java.base/share/classes/java/security/ProviderException.java
+++ b/jdk/src/java.base/share/classes/java/security/ProviderException.java
@@ -32,6 +32,7 @@ package java.security;
* throw specialized, provider-specific runtime errors.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class ProviderException extends RuntimeException {
diff --git a/jdk/src/java.base/share/classes/java/security/PublicKey.java b/jdk/src/java.base/share/classes/java/security/PublicKey.java
index df49807eea4..986f9d0c72f 100644
--- a/jdk/src/java.base/share/classes/java/security/PublicKey.java
+++ b/jdk/src/java.base/share/classes/java/security/PublicKey.java
@@ -34,6 +34,7 @@ package java.security;
* See, for example, the DSAPublicKey interface in
* {@code java.security.interfaces}.
*
+ * @since 1.1
* @see Key
* @see PrivateKey
* @see Certificate
diff --git a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java
index 4f0bfa4c27f..a6b8b6cffe6 100644
--- a/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java
+++ b/jdk/src/java.base/share/classes/java/security/SecureClassLoader.java
@@ -39,6 +39,7 @@ import sun.security.util.Debug;
*
* @author Li Gong
* @author Roland Schemers
+ * @since 1.2
*/
public class SecureClassLoader extends ClassLoader {
/*
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 ae1f04f2896..254f378aac6 100644
--- a/jdk/src/java.base/share/classes/java/security/SecureRandom.java
+++ b/jdk/src/java.base/share/classes/java/security/SecureRandom.java
@@ -143,6 +143,7 @@ import sun.security.util.Debug;
*
* @author Benjamin Renaud
* @author Josh Bloch
+ * @since 1.1
*/
public class SecureRandom extends java.util.Random {
diff --git a/jdk/src/java.base/share/classes/java/security/Security.java b/jdk/src/java.base/share/classes/java/security/Security.java
index 6c341abc92d..2431f1e1745 100644
--- a/jdk/src/java.base/share/classes/java/security/Security.java
+++ b/jdk/src/java.base/share/classes/java/security/Security.java
@@ -45,6 +45,7 @@ import sun.security.jca.*;
* {@code conf/security/java.security} in the Java installation directory.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public final class Security {
diff --git a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java
index e0d25c9689f..5211c23735d 100644
--- a/jdk/src/java.base/share/classes/java/security/SecurityPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/SecurityPermission.java
@@ -333,6 +333,7 @@ import java.util.StringTokenizer;
*
* @author Marianne Mueller
* @author Roland Schemers
+ * @since 1.2
*/
public final class SecurityPermission extends BasicPermission {
diff --git a/jdk/src/java.base/share/classes/java/security/Signature.java b/jdk/src/java.base/share/classes/java/security/Signature.java
index fd5dfad650a..c7c25831a35 100644
--- a/jdk/src/java.base/share/classes/java/security/Signature.java
+++ b/jdk/src/java.base/share/classes/java/security/Signature.java
@@ -113,6 +113,7 @@ import sun.security.jca.GetInstance.Instance;
* other algorithms are supported.
*
* @author Benjamin Renaud
+ * @since 1.1
*
*/
diff --git a/jdk/src/java.base/share/classes/java/security/SignatureException.java b/jdk/src/java.base/share/classes/java/security/SignatureException.java
index 2e1fa592f60..7788e12301b 100644
--- a/jdk/src/java.base/share/classes/java/security/SignatureException.java
+++ b/jdk/src/java.base/share/classes/java/security/SignatureException.java
@@ -29,6 +29,7 @@ package java.security;
* This is the generic Signature exception.
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public class SignatureException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/SignatureSpi.java b/jdk/src/java.base/share/classes/java/security/SignatureSpi.java
index 9be7701a2fa..99926824bd8 100644
--- a/jdk/src/java.base/share/classes/java/security/SignatureSpi.java
+++ b/jdk/src/java.base/share/classes/java/security/SignatureSpi.java
@@ -44,6 +44,7 @@ import sun.security.jca.JCAUtil;
* of a particular signature algorithm.
*
* @author Benjamin Renaud
+ * @since 1.2
*
*
* @see Signature
diff --git a/jdk/src/java.base/share/classes/java/security/SignedObject.java b/jdk/src/java.base/share/classes/java/security/SignedObject.java
index 94d4d0ae8a0..810c5706579 100644
--- a/jdk/src/java.base/share/classes/java/security/SignedObject.java
+++ b/jdk/src/java.base/share/classes/java/security/SignedObject.java
@@ -114,6 +114,7 @@ import java.io.*;
* @see Signature
*
* @author Li Gong
+ * @since 1.2
*/
public final class SignedObject implements Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/Signer.java b/jdk/src/java.base/share/classes/java/security/Signer.java
index 3c53f6c055f..88852b2e4be 100644
--- a/jdk/src/java.base/share/classes/java/security/Signer.java
+++ b/jdk/src/java.base/share/classes/java/security/Signer.java
@@ -38,6 +38,7 @@ import java.io.*;
* @see Identity
*
* @author Benjamin Renaud
+ * @since 1.1
*
* @deprecated This class is no longer used. Its functionality has been
* replaced by {@code java.security.KeyStore}, the
diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java
index 9827788806a..b5dc02dcb38 100644
--- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java
+++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermission.java
@@ -96,6 +96,7 @@ import java.security.cert.*;
*
*
* @author Roland Schemers
+ * @since 1.2
*/
public final class UnresolvedPermission extends Permission
diff --git a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java
index 5fdc3cbc8e0..bd4fb7562e1 100644
--- a/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java
+++ b/jdk/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java
@@ -43,6 +43,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
*
*
* @author Roland Schemers
+ * @since 1.2
*
* @serial include
*/
diff --git a/jdk/src/java.base/share/classes/java/security/acl/Acl.java b/jdk/src/java.base/share/classes/java/security/acl/Acl.java
index 0b2f374a2c9..423afdd695e 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/Acl.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/Acl.java
@@ -82,6 +82,7 @@ import java.security.Principal;
* @see java.security.acl.Acl#getPermissions
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java
index b785a05f3d7..242470876a6 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/AclEntry.java
@@ -50,6 +50,7 @@ import java.security.Principal;
* @see java.security.acl.Acl
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java
index c07852c5490..1585f93637d 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/AclNotFoundException.java
@@ -30,6 +30,7 @@ package java.security.acl;
* non-existent ACL (Access Control List).
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/acl/Group.java b/jdk/src/java.base/share/classes/java/security/acl/Group.java
index f68d5dae13c..6ce62330d87 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/Group.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/Group.java
@@ -39,6 +39,7 @@ import java.security.Principal;
* Principal or Group.
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java
index dab93db9c1e..3d655d7bf48 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/LastOwnerException.java
@@ -32,6 +32,7 @@ package java.security.acl;
* @see java.security.acl.Owner#deleteOwner
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java
index 3c7da3ebc8a..cf3b5975a7a 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/NotOwnerException.java
@@ -31,6 +31,7 @@ package java.security.acl;
* the object, but the Principal attempting the modification is not an owner.
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/acl/Owner.java b/jdk/src/java.base/share/classes/java/security/acl/Owner.java
index 476af4a0a80..0ba70035057 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/Owner.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/Owner.java
@@ -34,6 +34,7 @@ import java.security.Principal;
* interface.) The initial owner Principal should be specified as an
* argument to the constructor of the class implementing this interface.
*
+ * @since 1.1
* @see java.security.acl.Acl
*
* @deprecated This package has been replaced by {@code java.security.Policy}
diff --git a/jdk/src/java.base/share/classes/java/security/acl/Permission.java b/jdk/src/java.base/share/classes/java/security/acl/Permission.java
index 15b77429413..2c867490b6b 100644
--- a/jdk/src/java.base/share/classes/java/security/acl/Permission.java
+++ b/jdk/src/java.base/share/classes/java/security/acl/Permission.java
@@ -31,6 +31,7 @@ package java.security.acl;
* a particular type of access to a resource.
*
* @author Satish Dharmaraj
+ * @since 1.1
*
* @deprecated This package has been replaced by {@code java.security.Policy}
* and related classes since 1.2.
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CRLException.java b/jdk/src/java.base/share/classes/java/security/cert/CRLException.java
index 7a854316bbd..4b648e9ab9e 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CRLException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CRLException.java
@@ -31,6 +31,7 @@ import java.security.GeneralSecurityException;
* CRL (Certificate Revocation List) Exception.
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public class CRLException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java
index 32662ceea15..ad72e638d39 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/Certificate.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/Certificate.java
@@ -57,6 +57,7 @@ import sun.security.x509.X509CertImpl;
* @see CertificateFactory
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public abstract class Certificate implements java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java
index 618ee0a55b9..c30b96c46c8 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateEncodingException.java
@@ -30,6 +30,7 @@ package java.security.cert;
* occurs while attempting to encode a certificate.
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public class CertificateEncodingException extends CertificateException {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java
index f663054000b..ce73103aaab 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateException.java
@@ -31,6 +31,7 @@ import java.security.GeneralSecurityException;
* This exception indicates one of a variety of certificate problems.
*
* @author Hemma Prafullchandra
+ * @since 1.2
* @see Certificate
*/
public class CertificateException extends GeneralSecurityException {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java
index 9de0c236c13..635a32f5cda 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateExpiredException.java
@@ -32,6 +32,7 @@ package java.security.cert;
* of the certificate.
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public class CertificateExpiredException extends CertificateException {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java
index e8722bd339d..75f3e150283 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateNotYetValidException.java
@@ -32,6 +32,7 @@ package java.security.cert;
* validity period.
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public class CertificateNotYetValidException extends CertificateException {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java b/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java
index 06a7d603f29..36fa9650874 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/CertificateParsingException.java
@@ -31,6 +31,7 @@ package java.security.cert;
* are found in the Certificate.
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public class CertificateParsingException extends CertificateException {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java b/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java
index 821e3d0cfad..bbff8c841f1 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRL.java
@@ -103,6 +103,7 @@ import sun.security.x509.X509CRLImpl;
* }
*
* @author Hemma Prafullchandra
+ * @since 1.2
*
*
* @see CRL
diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java b/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java
index 268fa819587..4028738dae9 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509CRLEntry.java
@@ -62,6 +62,7 @@ import sun.security.x509.X509CRLEntryImpl;
* @see X509Extension
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public abstract class X509CRLEntry implements X509Extension {
diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java b/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java
index d93e66c925a..9690f826e67 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509Certificate.java
@@ -95,6 +95,7 @@ import sun.security.x509.X509CertImpl;
*
*
* @author Hemma Prafullchandra
+ * @since 1.2
*
*
* @see Certificate
diff --git a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java
index 9a988f4dc93..b7533a2c697 100644
--- a/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java
+++ b/jdk/src/java.base/share/classes/java/security/cert/X509Extension.java
@@ -65,6 +65,7 @@ import java.util.Set;
* be handled by a Class that understands the extension.
*
* @author Hemma Prafullchandra
+ * @since 1.2
*/
public interface X509Extension {
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java
index d78b3e19853..64ac8c4b931 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKey.java
@@ -35,6 +35,7 @@ package java.security.interfaces;
*
* @author Benjamin Renaud
* @author Josh Bloch
+ * @since 1.1
*/
public interface DSAKey {
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java
index 558ac4419c2..dc231db419c 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java
@@ -65,6 +65,7 @@ import java.security.*;
* Note: Some earlier implementations of this interface may not support
* larger sizes of DSA parameters such as 2048 and 3072-bit.
*
+ * @since 1.1
* @see java.security.KeyPairGenerator
*/
public interface DSAKeyPairGenerator {
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java
index 8c46ed57e27..2eafe879e7d 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAParams.java
@@ -38,6 +38,7 @@ import java.math.BigInteger;
*
* @author Benjamin Renaud
* @author Josh Bloch
+ * @since 1.1
*/
public interface DSAParams {
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java
index 81ab3586f69..b23a5c14d42 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPrivateKey.java
@@ -37,6 +37,7 @@ import java.math.BigInteger;
* @see DSAPublicKey
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey {
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java
index e56b795ae70..fb4a2f3226e 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/DSAPublicKey.java
@@ -37,6 +37,7 @@ import java.math.BigInteger;
* @see DSAPrivateKey
*
* @author Benjamin Renaud
+ * @since 1.1
*/
public interface DSAPublicKey extends DSAKey, java.security.PublicKey {
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java
index 0408feabbbc..89dd478c831 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateCrtKey.java
@@ -32,6 +32,7 @@ import java.math.BigInteger;
* using the Chinese Remainder Theorem (CRT) information values.
*
* @author Jan Luehe
+ * @since 1.2
*
*
* @see RSAPrivateKey
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java
index 5d69ad6837e..390da4e89fd 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPrivateKey.java
@@ -31,6 +31,7 @@ import java.math.BigInteger;
* The interface to an RSA private key.
*
* @author Jan Luehe
+ * @since 1.2
*
*
* @see RSAPrivateCrtKey
diff --git a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java
index a698c05f738..f19530604d7 100644
--- a/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java
+++ b/jdk/src/java.base/share/classes/java/security/interfaces/RSAPublicKey.java
@@ -31,6 +31,7 @@ import java.math.BigInteger;
* The interface to an RSA public key.
*
* @author Jan Luehe
+ * @since 1.2
*
*/
diff --git a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java
index d0ba70be443..1c66e537983 100644
--- a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java
+++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateCrtKeySpec.java
@@ -33,6 +33,7 @@ import java.math.BigInteger;
* efficiency.
*
* @author Jan Luehe
+ * @since 1.2
*
*
* @see java.security.Key
diff --git a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java
index e7491461684..6a750354e1b 100644
--- a/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java
+++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPrivateKeySpec.java
@@ -31,6 +31,7 @@ import java.math.BigInteger;
* This class specifies an RSA private key.
*
* @author Jan Luehe
+ * @since 1.2
*
*
* @see java.security.Key
diff --git a/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java b/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java
index 9a944f962b1..68ce197c939 100644
--- a/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java
+++ b/jdk/src/java.base/share/classes/java/security/spec/RSAPublicKeySpec.java
@@ -31,6 +31,7 @@ import java.math.BigInteger;
* This class specifies an RSA public key.
*
* @author Jan Luehe
+ * @since 1.2
*
*
* @see java.security.Key
diff --git a/jdk/src/java.base/share/classes/java/text/BreakIterator.java b/jdk/src/java.base/share/classes/java/text/BreakIterator.java
index 0c780258e47..ffb5d5938e5 100644
--- a/jdk/src/java.base/share/classes/java/text/BreakIterator.java
+++ b/jdk/src/java.base/share/classes/java/text/BreakIterator.java
@@ -221,6 +221,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* and the next is a word; otherwise, it's the material between words.)
*
*
+ * @since 1.1
* @see CharacterIterator
*
*/
diff --git a/jdk/src/java.base/share/classes/java/text/CharacterIterator.java b/jdk/src/java.base/share/classes/java/text/CharacterIterator.java
index efa7ab413b0..b6e5e8b1196 100644
--- a/jdk/src/java.base/share/classes/java/text/CharacterIterator.java
+++ b/jdk/src/java.base/share/classes/java/text/CharacterIterator.java
@@ -98,6 +98,7 @@ package java.text;
* }
* }
*
+ * @since 1.1
* @see StringCharacterIterator
* @see AttributedCharacterIterator
*/
diff --git a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java
index 8f76aaedf04..13697dfcc8f 100644
--- a/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java
+++ b/jdk/src/java.base/share/classes/java/text/ChoiceFormat.java
@@ -163,6 +163,7 @@ import java.util.Arrays;
* @see DecimalFormat
* @see MessageFormat
* @author Mark Davis
+ * @since 1.1
*/
public class ChoiceFormat extends NumberFormat {
diff --git a/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java b/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java
index 7060ac0c8b6..9da55b26625 100644
--- a/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java
+++ b/jdk/src/java.base/share/classes/java/text/CollationElementIterator.java
@@ -104,6 +104,7 @@ import sun.text.normalizer.NormalizerBase;
* @see Collator
* @see RuleBasedCollator
* @author Helena Shih, Laura Werner, Richard Gillam
+ * @since 1.1
*/
public final class CollationElementIterator
{
diff --git a/jdk/src/java.base/share/classes/java/text/CollationKey.java b/jdk/src/java.base/share/classes/java/text/CollationKey.java
index 4f9c3c6ac49..318f3c4d26b 100644
--- a/jdk/src/java.base/share/classes/java/text/CollationKey.java
+++ b/jdk/src/java.base/share/classes/java/text/CollationKey.java
@@ -95,6 +95,7 @@ package java.text;
* @see Collator
* @see RuleBasedCollator
* @author Helena Shih
+ * @since 1.1
*/
public abstract class CollationKey implements Comparable {
diff --git a/jdk/src/java.base/share/classes/java/text/Collator.java b/jdk/src/java.base/share/classes/java/text/Collator.java
index ce2f8945856..cd8fa44d3b9 100644
--- a/jdk/src/java.base/share/classes/java/text/Collator.java
+++ b/jdk/src/java.base/share/classes/java/text/Collator.java
@@ -123,6 +123,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* @see CollationElementIterator
* @see Locale
* @author Helena Shih, Laura Werner, Richard Gillam
+ * @since 1.1
*/
public abstract class Collator
diff --git a/jdk/src/java.base/share/classes/java/text/DateFormat.java b/jdk/src/java.base/share/classes/java/text/DateFormat.java
index 620dbe87372..f4e7a5ab849 100644
--- a/jdk/src/java.base/share/classes/java/text/DateFormat.java
+++ b/jdk/src/java.base/share/classes/java/text/DateFormat.java
@@ -167,6 +167,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* @see java.util.GregorianCalendar
* @see java.util.TimeZone
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
+ * @since 1.1
*/
public abstract class DateFormat extends Format {
diff --git a/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java b/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java
index 0360631a02d..724c1e71ac3 100644
--- a/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java
+++ b/jdk/src/java.base/share/classes/java/text/DateFormatSymbols.java
@@ -98,6 +98,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* @see SimpleDateFormat
* @see java.util.SimpleTimeZone
* @author Chen-Lieh Huang
+ * @since 1.1
*/
public class DateFormatSymbols implements Serializable, Cloneable {
diff --git a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java
index 999ff9abdec..84f6fcbab8e 100644
--- a/jdk/src/java.base/share/classes/java/text/DecimalFormat.java
+++ b/jdk/src/java.base/share/classes/java/text/DecimalFormat.java
@@ -381,6 +381,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* @see ParsePosition
* @author Mark Davis
* @author Alan Liu
+ * @since 1.1
*/
public class DecimalFormat extends NumberFormat {
diff --git a/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java b/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java
index cf7e7e5ffc7..989d6f26377 100644
--- a/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java
+++ b/jdk/src/java.base/share/classes/java/text/DecimalFormatSymbols.java
@@ -60,6 +60,7 @@ import sun.util.locale.provider.ResourceBundleBasedAdapter;
* @see DecimalFormat
* @author Mark Davis
* @author Alan Liu
+ * @since 1.1
*/
public class DecimalFormatSymbols implements Cloneable, Serializable {
diff --git a/jdk/src/java.base/share/classes/java/text/FieldPosition.java b/jdk/src/java.base/share/classes/java/text/FieldPosition.java
index 955221dee80..7a6e2a58e93 100644
--- a/jdk/src/java.base/share/classes/java/text/FieldPosition.java
+++ b/jdk/src/java.base/share/classes/java/text/FieldPosition.java
@@ -68,6 +68,7 @@ package java.text;
* formatToCharacterIterator.
*
* @author Mark Davis
+ * @since 1.1
* @see java.text.Format
*/
public class FieldPosition {
diff --git a/jdk/src/java.base/share/classes/java/text/Format.java b/jdk/src/java.base/share/classes/java/text/Format.java
index ee6fb4d1fb7..be324eb63ba 100644
--- a/jdk/src/java.base/share/classes/java/text/Format.java
+++ b/jdk/src/java.base/share/classes/java/text/Format.java
@@ -129,6 +129,7 @@ import java.io.Serializable;
* @see java.text.DateFormat
* @see java.text.MessageFormat
* @author Mark Davis
+ * @since 1.1
*/
public abstract class Format implements Serializable, Cloneable {
diff --git a/jdk/src/java.base/share/classes/java/text/MessageFormat.java b/jdk/src/java.base/share/classes/java/text/MessageFormat.java
index 1275f3cc33a..b80eb054f51 100644
--- a/jdk/src/java.base/share/classes/java/text/MessageFormat.java
+++ b/jdk/src/java.base/share/classes/java/text/MessageFormat.java
@@ -344,6 +344,7 @@ import java.util.Locale;
* @see SimpleDateFormat
*
* @author Mark Davis
+ * @since 1.1
*/
public class MessageFormat extends Format {
diff --git a/jdk/src/java.base/share/classes/java/text/NumberFormat.java b/jdk/src/java.base/share/classes/java/text/NumberFormat.java
index 7e86bbe35d5..86953f21c9a 100644
--- a/jdk/src/java.base/share/classes/java/text/NumberFormat.java
+++ b/jdk/src/java.base/share/classes/java/text/NumberFormat.java
@@ -185,6 +185,7 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
* @see ChoiceFormat
* @author Mark Davis
* @author Helena Shih
+ * @since 1.1
*/
public abstract class NumberFormat extends Format {
diff --git a/jdk/src/java.base/share/classes/java/text/ParseException.java b/jdk/src/java.base/share/classes/java/text/ParseException.java
index f9ad001fa52..264c4803fc5 100644
--- a/jdk/src/java.base/share/classes/java/text/ParseException.java
+++ b/jdk/src/java.base/share/classes/java/text/ParseException.java
@@ -45,6 +45,7 @@ package java.text;
* @see java.text.Format
* @see java.text.FieldPosition
* @author Mark Davis
+ * @since 1.1
*/
public
class ParseException extends Exception {
diff --git a/jdk/src/java.base/share/classes/java/text/ParsePosition.java b/jdk/src/java.base/share/classes/java/text/ParsePosition.java
index be3ffce61eb..85e5c9d9e3c 100644
--- a/jdk/src/java.base/share/classes/java/text/ParsePosition.java
+++ b/jdk/src/java.base/share/classes/java/text/ParsePosition.java
@@ -51,6 +51,7 @@ package java.text;
* records the current position.
*
* @author Mark Davis
+ * @since 1.1
* @see java.text.Format
*/
diff --git a/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java b/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java
index e3c2c8c309e..c8140a5efa0 100644
--- a/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java
+++ b/jdk/src/java.base/share/classes/java/text/RuleBasedCollator.java
@@ -242,6 +242,7 @@ import java.util.Locale;
* @see Collator
* @see CollationElementIterator
* @author Helena Shih, Laura Werner, Richard Gillam
+ * @since 1.1
*/
public class RuleBasedCollator extends Collator{
// IMPLEMENTATION NOTES: The implementation of the collation algorithm is
diff --git a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java
index 70987ad99df..4990338e1a6 100644
--- a/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java
+++ b/jdk/src/java.base/share/classes/java/text/SimpleDateFormat.java
@@ -434,6 +434,7 @@ import sun.util.locale.provider.LocaleProviderAdapter;
* @see DateFormat
* @see DateFormatSymbols
* @author Mark Davis, Chen-Lieh Huang, Alan Liu
+ * @since 1.1
*/
public class SimpleDateFormat extends DateFormat {
diff --git a/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java b/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java
index 66b5be65157..b5d510cd642 100644
--- a/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java
+++ b/jdk/src/java.base/share/classes/java/text/StringCharacterIterator.java
@@ -47,6 +47,7 @@ package java.text;
* entire String.
*
* @see CharacterIterator
+ * @since 1.1
*/
public final class StringCharacterIterator implements CharacterIterator
diff --git a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java
index e7fecee180c..340b53353da 100644
--- a/jdk/src/java.base/share/classes/java/util/ResourceBundle.java
+++ b/jdk/src/java.base/share/classes/java/util/ResourceBundle.java
@@ -216,16 +216,17 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
* the caller module, those resource bundles need to be loaded from service
* providers of {@link ResourceBundleProvider}. The caller module must declare
* "{@code uses}" and the service interface name is the concatenation of the
- * base name of the bundles and the string "{@code Provider}". The
+ * package name of the base name, string "{@code .spi.}", the simple class
+ * name of the base name, and the string "{@code Provider}". The
* bundle provider modules containing resource bundles must
* declare "{@code provides}" with the service interface name and
* its implementation class name. For example, if the base name is
* "{@code com.example.app.MyResources}", the caller module must declare
- * "{@code uses com.example.app.MyResourcesProvider;}" and a module containing resource
- * bundles must declare "{@code provides com.example.app.MyResourcesProvider
+ * "{@code uses com.example.app.spi.MyResourcesProvider;}" and a module containing resource
+ * bundles must declare "{@code provides com.example.app.spi.MyResourcesProvider
* with com.example.app.internal.MyResourcesProviderImpl;}"
* where {@code com.example.app.internal.MyResourcesProviderImpl} is an
- * implementation class of {@code com.example.app.MyResourcesProvider}.
+ * implementation class of {@code com.example.app.spi.MyResourcesProvider}.
* If you want to use non-standard formats in named modules, such as XML,
* {@link ResourceBundleProvider} needs to be used.
* The {@code getBundle} method with a {@code ClassLoader} may not be able to
@@ -243,9 +244,10 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
*
* The {@code getBundle} factory methods load service providers of
* {@link ResourceBundleProvider}, if available, using {@link ServiceLoader}.
- * The service type is designated by {@code basename+"Provider"}. For
+ * The service type is designated by
+ * {@code + ".spi." + + "Provider"}. For
* example, if the base name is "{@code com.example.app.MyResources}", the service
- * type is {@code com.example.app.MyResourcesProvider}.
+ * type is {@code com.example.app.spi.MyResourcesProvider}.
*
* In named modules, the loaded service providers for the given base name are
* used to load resource bundles. If no service provider is available, or if
@@ -923,7 +925,12 @@ public abstract class ResourceBundle {
* Resource bundles in named modules may be encapsulated. When
* the resource bundle is loaded from a provider, the caller module
* must have an appropriate uses clause in its module descriptor
- * to declare that the module uses implementations of {@code "baseName"Provider}.
+ * to declare that the module uses implementations of
+ * {@code + ".spi." + + "Provider"}.
+ * Otherwise, it will load the resource bundles that are local in the
+ * given module or that are visible to the class loader of the given module
+ * (refer to the Resource Bundles in Named Modules
+ * section for details).
* When the resource bundle is loaded from the specified module, it is
* subject to the encapsulation rules specified by
* {@link Module#getResourceAsStream Module.getResourceAsStream}.
@@ -958,20 +965,17 @@ public abstract class ResourceBundle {
* Resource bundles in named modules may be encapsulated. When
* the resource bundle is loaded from a provider, the caller module
* must have an appropriate uses clause in its module descriptor
- * to declare that the module uses implementations of {@code "baseName"Provider}.
+ * to declare that the module uses implementations of
+ * {@code + ".spi." + + "Provider"}.
+ * Otherwise, it will load the resource bundles that are local in the
+ * given module or that are visible to the class loader of the given module
+ * (refer to the Resource Bundles in Named Modules
+ * section for details).
* When the resource bundle is loaded from the specified module, it is
* subject to the encapsulation rules specified by
* {@link Module#getResourceAsStream Module.getResourceAsStream}.
*
*
- * If the given {@code module} is a named module, this method will
- * load the service providers for {@link java.util.spi.ResourceBundleProvider}
- * and also resource bundles that are local in the given module or that
- * are visible to the class loader of the given module (refer to the
- * Resource Bundles in Named Modules section
- * for details).
- *
- *
* If the given {@code module} is an unnamed module, then this method is
* equivalent to calling {@link #getBundle(String, Locale, ClassLoader)
* getBundle(baseName, targetLocale, module.getClassLoader()} to load
@@ -1070,8 +1074,10 @@ public abstract class ResourceBundle {
* Resource bundles in a named module are private to that module. If
* the caller is in a named module, this method will find resource bundles
* from the service providers of {@link java.util.spi.ResourceBundleProvider}
- * and also find resource bundles that are in the caller's module or
- * that are visible to the given class loader.
+ * if any. Otherwise, it will load the resource bundles that are visible to
+ * the given {@code loader} (refer to the
+ * Resource Bundles in Named Modules section
+ * for details).
* If the caller is in a named module and the given {@code loader} is
* different than the caller's class loader, or if the caller is not in
* a named module, this method will not find resource bundles from named
@@ -1883,8 +1889,15 @@ public abstract class ResourceBundle {
private static Class
getResourceBundleProviderType(String baseName, ClassLoader loader)
{
- // Look up + "Provider"
- String providerName = baseName + "Provider";
+ // Look up + ".spi." + "Provider"
+ int i = baseName.lastIndexOf('.');
+ if (i <= 0) {
+ return null;
+ }
+
+ String name = baseName.substring(i+1, baseName.length()) + "Provider";
+ String providerName = baseName.substring(0, i) + ".spi." + name;
+
// Use the class loader of the getBundle caller so that the caller's
// visibility of the provider type is checked.
return AccessController.doPrivileged(
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java b/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java
index f647e213128..5e5232efa7a 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletionService.java
@@ -57,6 +57,8 @@ package java.util.concurrent;
* happen-before
* actions taken by that task, which in turn happen-before
* actions following a successful return from the corresponding {@code take()}.
+ *
+ * @since 1.5
*/
public interface CompletionService {
/**
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java
index 77208837d57..67dcfc26c17 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ExecutorCompletionService.java
@@ -97,6 +97,8 @@ package java.util.concurrent;
* if (result != null)
* use(result);
* }}
+ *
+ * @since 1.5
*/
public class ExecutorCompletionService implements CompletionService {
private final Executor executor;
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
index 7bf6e8a54cd..09c4368c6cc 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
@@ -133,6 +133,8 @@ import jdk.internal.misc.Unsafe;
* Class> ensureLoaded = LockSupport.class;
* }
* }}
+ *
+ * @since 1.5
*/
public class LockSupport {
private LockSupport() {} // Cannot be instantiated.
diff --git a/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java b/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java
index b0e6841bf83..28a69cf805c 100644
--- a/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java
+++ b/jdk/src/java.base/share/classes/java/util/jar/JarEntry.java
@@ -32,6 +32,8 @@ import java.security.cert.Certificate;
/**
* This class is used to represent a JAR file entry.
+ *
+ * @since 1.2
*/
public
class JarEntry extends ZipEntry {
diff --git a/jdk/src/java.base/share/classes/java/util/package-info.java b/jdk/src/java.base/share/classes/java/util/package-info.java
index e6406f14d3d..ff82404b45f 100644
--- a/jdk/src/java.base/share/classes/java/util/package-info.java
+++ b/jdk/src/java.base/share/classes/java/util/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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 @@
* miscellaneous utility classes (a string tokenizer, a random-number
* generator, and a bit array).
*
- * {@index "Java Collections Framework"}
+ * {@index "Java Collections Framework"}
*
* - Collections Framework Overview
*
-
diff --git a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java
index 396ffeae696..004aab08f9a 100644
--- a/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java
+++ b/jdk/src/java.base/share/classes/java/util/spi/CalendarNameProvider.java
@@ -46,7 +46,7 @@ import java.util.Map;
* Calendar}. The following are calendar-common fields and their values to be
* supported for each calendar system.
*
- *
+ *
* Field values
*
*
@@ -57,8 +57,8 @@ import java.util.Map;
*
*
*
- * | {@link Calendar#MONTH} |
- * {@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER} |
+ * {@link Calendar#MONTH} |
+ * {@link Calendar#JANUARY} to {@link Calendar#UNDECIMBER} |
* Month numbering is 0-based (e.g., 0 - January, ..., 11 -
* December). Some calendar systems have 13 months. Month
* names need to be supported in both the formatting and
@@ -67,14 +67,14 @@ import java.util.Map;
* in both of the forms. |
*
*
- * | {@link Calendar#DAY_OF_WEEK} |
- * {@link Calendar#SUNDAY} to {@link Calendar#SATURDAY} |
+ * {@link Calendar#DAY_OF_WEEK} |
+ * {@link Calendar#SUNDAY} to {@link Calendar#SATURDAY} |
* Day-of-week numbering is 1-based starting from Sunday (i.e., 1 - Sunday,
* ..., 7 - Saturday). |
*
*
- * | {@link Calendar#AM_PM} |
- * {@link Calendar#AM} to {@link Calendar#PM} |
+ * {@link Calendar#AM_PM} |
+ * {@link Calendar#AM} to {@link Calendar#PM} |
* 0 - AM, 1 - PM |
*
*
@@ -82,7 +82,7 @@ import java.util.Map;
*
* The following are calendar-specific fields and their values to be supported.
*
- *
+ *
* Calendar type and field values
*
*
@@ -94,8 +94,8 @@ import java.util.Map;
*
*
*
- * | {@code "gregory"} |
- * {@link Calendar#ERA} |
+ * {@code "gregory"} |
+ * {@link Calendar#ERA} |
* 0 |
* {@link java.util.GregorianCalendar#BC} (BCE) |
*
@@ -104,8 +104,8 @@ import java.util.Map;
* {@link java.util.GregorianCalendar#AD} (CE) |
*
*
- * | {@code "buddhist"} |
- * {@link Calendar#ERA} |
+ * {@code "buddhist"} |
+ * {@link Calendar#ERA} |
* 0 |
* BC (BCE) |
*
@@ -114,8 +114,8 @@ import java.util.Map;
* B.E. (Buddhist Era) |
*
*
- * | {@code "japanese"} |
- * {@link Calendar#ERA} |
+ * {@code "japanese"} |
+ * {@link Calendar#ERA} |
* 0 |
* Seireki (Before Meiji) |
*
@@ -144,8 +144,8 @@ import java.util.Map;
* Year representation in {@code SimpleDateFormat}.
*
*
- * | {@code "roc"} |
- * {@link Calendar#ERA} |
+ * {@code "roc"} |
+ * {@link Calendar#ERA} |
* 0 |
* Before R.O.C. |
*
@@ -154,8 +154,8 @@ import java.util.Map;
* R.O.C. |
*
*
- * | {@code "islamic"} |
- * {@link Calendar#ERA} |
+ * {@code "islamic"} |
+ * {@link Calendar#ERA} |
* 0 |
* Before AH |
*
diff --git a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java
index 251831f1dcb..0cb0bccd4a6 100644
--- a/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java
+++ b/jdk/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.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
@@ -35,11 +35,11 @@ import java.util.ResourceBundle;
* during a call to the
* {@link ResourceBundle#getBundle(String, Locale, ClassLoader)
* ResourceBundle.getBundle} method. The provider service type is determined by
- * {@code basename+"Provider"}.
+ * {@code + ".spi." + + "Provider"}.
*
*
* For example, if the base name is "com.example.app.MyResources",
- * {@code com.example.app.MyResourcesProvider} will be the provider service type:
+ * {@code com.example.app.spi.MyResourcesProvider} will be the provider service type:
* {@code
* public interface MyResourcesProvider extends ResourceBundleProvider {
* }
diff --git a/jdk/src/java.base/share/classes/java/util/zip/Adler32.java b/jdk/src/java.base/share/classes/java/util/zip/Adler32.java
index 425c35d1bf4..5881282a8e3 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/Adler32.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/Adler32.java
@@ -39,6 +39,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
* a {@link NullPointerException} to be thrown.
*
* @author David Connelly
+ * @since 1.1
*/
public
class Adler32 implements Checksum {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/CRC32.java b/jdk/src/java.base/share/classes/java/util/zip/CRC32.java
index 4b04ab20238..b60dea653e4 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/CRC32.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/CRC32.java
@@ -38,6 +38,7 @@ import jdk.internal.HotSpotIntrinsicCandidate;
* a {@link NullPointerException} to be thrown.
*
* @author David Connelly
+ * @since 1.1
*/
public
class CRC32 implements Checksum {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java
index e1e5249c251..05c6f891c16 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/CheckedInputStream.java
@@ -35,6 +35,7 @@ import java.io.IOException;
*
* @see Checksum
* @author David Connelly
+ * @since 1.1
*/
public
class CheckedInputStream extends FilterInputStream {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java
index 698b9410f5f..9267d8e1c89 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/CheckedOutputStream.java
@@ -36,6 +36,7 @@ import java.io.IOException;
*
* @see Checksum
* @author David Connelly
+ * @since 1.1
*/
public
class CheckedOutputStream extends FilterOutputStream {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/Checksum.java b/jdk/src/java.base/share/classes/java/util/zip/Checksum.java
index eb681861785..db9490cd2c6 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/Checksum.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/Checksum.java
@@ -30,6 +30,7 @@ import java.nio.ByteBuffer;
* An interface representing a data checksum.
*
* @author David Connelly
+ * @since 1.1
*/
public interface Checksum {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java b/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java
index 77adbe90c12..a5639b3ebb1 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/DataFormatException.java
@@ -29,6 +29,7 @@ package java.util.zip;
* Signals that a data format error has occurred.
*
* @author David Connelly
+ * @since 1.1
*/
public
class DataFormatException extends Exception {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java
index 6eb5065040e..494018939b6 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/Deflater.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/Deflater.java
@@ -69,6 +69,7 @@ package java.util.zip;
*
* @see Inflater
* @author David Connelly
+ * @since 1.1
*/
public
class Deflater {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java
index a1f768caea4..ac8f2ae90c4 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java
@@ -37,6 +37,7 @@ import java.io.IOException;
*
* @see Deflater
* @author David Connelly
+ * @since 1.1
*/
public
class DeflaterOutputStream extends FilterOutputStream {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java
index d5a2f4544df..f5f530f5da6 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/GZIPInputStream.java
@@ -38,6 +38,7 @@ import java.io.EOFException;
*
* @see InflaterInputStream
* @author David Connelly
+ * @since 1.1
*
*/
public
diff --git a/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java
index 67a20a1c291..9ff56f156c2 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/GZIPOutputStream.java
@@ -32,6 +32,7 @@ import java.io.IOException;
* This class implements a stream filter for writing compressed data in
* the GZIP file format.
* @author David Connelly
+ * @since 1.1
*
*/
public
diff --git a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java
index 2aab545f2a1..edf0add3314 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/Inflater.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/Inflater.java
@@ -68,6 +68,7 @@ package java.util.zip;
*
* @see Deflater
* @author David Connelly
+ * @since 1.1
*
*/
public
diff --git a/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java
index 57e38b341c8..fd4c05736fa 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/InflaterInputStream.java
@@ -37,6 +37,7 @@ import java.io.EOFException;
*
* @see Inflater
* @author David Connelly
+ * @since 1.1
*/
public
class InflaterInputStream extends FilterInputStream {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java b/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java
index db7f500424f..4f54718e0e1 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipConstants.java
@@ -30,6 +30,7 @@ package java.util.zip;
* which manipulate ZIP files.
*
* @author David Connelly
+ * @since 1.1
*/
interface ZipConstants {
/*
diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java
index c00b5bf6789..e52ea06cf2e 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipEntry.java
@@ -39,6 +39,7 @@ import static java.util.zip.ZipConstants64.*;
* This class is used to represent a ZIP file entry.
*
* @author David Connelly
+ * @since 1.1
*/
public
class ZipEntry implements ZipConstants, Cloneable {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java
index 83ce2441eeb..74264ed21a4 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipFile.java
@@ -70,6 +70,7 @@ import static java.util.zip.ZipUtils.*;
* thrown.
*
* @author David Connelly
+ * @since 1.1
*/
public
class ZipFile implements ZipConstants, Closeable {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java b/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java
index c615aaa7eb9..29cbc23f7de 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipInputStream.java
@@ -40,6 +40,7 @@ import static java.util.zip.ZipUtils.*;
* entries.
*
* @author David Connelly
+ * @since 1.1
*/
public
class ZipInputStream extends InflaterInputStream implements ZipConstants {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java b/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java
index b298653b39d..1770ef3bff9 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/ZipOutputStream.java
@@ -41,6 +41,7 @@ import sun.security.action.GetPropertyAction;
* entries.
*
* @author David Connelly
+ * @since 1.1
*/
public
class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
diff --git a/jdk/src/java.base/share/classes/java/util/zip/package-info.java b/jdk/src/java.base/share/classes/java/util/zip/package-info.java
index a6ec2072413..f89085e1af3 100644
--- a/jdk/src/java.base/share/classes/java/util/zip/package-info.java
+++ b/jdk/src/java.base/share/classes/java/util/zip/package-info.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -37,13 +37,13 @@
* Info-ZIP Application Note 970311 - a detailed description of
* the Info-ZIP format upon which the {@code java.util.zip} classes
* are based.
- * - An implementation may optionally support the
+ *
- An implementation may optionally support the
* ZIP64(tm) format extensions defined by the
*
* PKWARE ZIP File Format Specification. The ZIP64(tm) format
* extensions are used to overcome the size limitations of the
* original ZIP format.
- *
- APPENDIX D of
+ *
- APPENDIX D of
*
* PKWARE ZIP File Format Specification - Language Encoding Flag
* (EFS) to encode ZIP entry filename and comment fields using UTF-8.
diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java
index 135f0ce33df..b9b621478c3 100644
--- a/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java
+++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGenerator.java
@@ -83,6 +83,15 @@ import sun.security.util.Debug;
*
In case the client does not explicitly initialize the KeyGenerator
* (via a call to an {@code init} method), each provider must
* supply (and document) a default initialization.
+ * See the Keysize Restriction sections of the
+ *
+ * JDK Providers
+ * document for information on the KeyGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyGenerator instead of relying on provider-specific defaults.
*
* Every implementation of the Java platform is required to support the
* following standard {@code KeyGenerator} algorithms with the keysizes in
diff --git a/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java b/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java
index f271e413cfc..57d86254281 100644
--- a/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java
+++ b/jdk/src/java.base/share/classes/javax/crypto/KeyGeneratorSpi.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -35,6 +35,19 @@ import java.security.spec.*;
* cryptographic service provider who wishes to supply the implementation
* of a key generator for a particular algorithm.
*
+ * In case the client does not explicitly initialize the KeyGenerator
+ * (via a call to an {@code init} method), each provider must
+ * supply (and document) a default initialization.
+ * See the Keysize Restriction sections of the
+ *
+ * JDK Providers
+ * document for information on the KeyGenerator defaults used by
+ * JDK providers.
+ * However, note that defaults may vary across different providers.
+ * Additionally, the default value for a provider may change in a future
+ * version. Therefore, it is recommended to explicitly initialize the
+ * KeyGenerator instead of relying on provider-specific defaults.
+ *
* @author Jan Luehe
*
* @see SecretKey
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java
index 6cbff526932..bfdd022c138 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/AuthPermission.java
@@ -139,6 +139,7 @@ package javax.security.auth;
* @implNote
* Implementations may define additional target names, but should use naming
* conventions such as reverse domain name notation to avoid name clashes.
+ * @since 1.4
*/
public final class AuthPermission extends
java.security.BasicPermission {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java b/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java
index 4c72dda0484..66a84f46aa9 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/DestroyFailedException.java
@@ -32,6 +32,7 @@ package javax.security.auth;
* the {@code Destroyable} interface when the {@code destroy}
* method fails.
*
+ * @since 1.4
*/
public class DestroyFailedException extends Exception {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java b/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java
index eeb2ba0541e..5758cc4f453 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Destroyable.java
@@ -29,6 +29,7 @@ package javax.security.auth;
* Objects such as credentials may optionally implement this interface
* to provide the capability to destroy its contents.
*
+ * @since 1.4
* @see javax.security.auth.Subject
*/
public interface Destroyable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Policy.java b/jdk/src/java.base/share/classes/javax/security/auth/Policy.java
index 605161e363a..b9f61da72db 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/Policy.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Policy.java
@@ -153,6 +153,7 @@ import sun.security.util.Debug;
* These two APIs provide callers the means to query the
* Policy for Principal-based Permission entries.
*
+ * @since 1.4
* @see java.security.Security security properties
*/
@Deprecated(since="1.4")
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java b/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java
index 217bf9ea95f..fdd1d017986 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/PrivateCredentialPermission.java
@@ -100,6 +100,7 @@ import sun.security.util.ResourcesMgr;
* "a.b.Principal" with the name, "duke", and "c.d.Principal", with the name,
* "dukette".
*
+ * @since 1.4
*/
public final class PrivateCredentialPermission extends Permission {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java b/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java
index ff44d06f307..d69be787daf 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/RefreshFailedException.java
@@ -32,6 +32,7 @@ package javax.security.auth;
* the {@code Refreshable} interface when the {@code refresh}
* method fails.
*
+ * @since 1.4
*/
public class RefreshFailedException extends Exception {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java b/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java
index 8f727eafc28..73f1ec48431 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Refreshable.java
@@ -32,6 +32,7 @@ package javax.security.auth;
* may implement this interface to allow callers to refresh the time period
* for which it is valid.
*
+ * @since 1.4
* @see javax.security.auth.Subject
*/
public interface Refreshable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java
index 96c6eeaf30e..602298df9b6 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/Subject.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/Subject.java
@@ -94,6 +94,7 @@ import sun.security.util.ResourcesMgr;
* {@code Principal} implementations associated with Subjects
* must implement {@code Serializable}.
*
+ * @since 1.4
* @see java.security.Principal
* @see java.security.DomainCombiner
*/
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java b/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java
index a6cc910d3ab..b80cec126a5 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java
@@ -43,6 +43,7 @@ import java.lang.ref.WeakReference;
* with Principals from the {@code Subject} associated with this
* {@code SubjectDomainCombiner}.
*
+ * @since 1.4
*/
public class SubjectDomainCombiner implements java.security.DomainCombiner {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java
index 83855ca0484..d8522e40d8f 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/Callback.java
@@ -40,6 +40,7 @@ package javax.security.auth.callback;
* if appropriate, to return requested information back to the
* underlying security services.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
* @see javax.security.auth.callback.ChoiceCallback
* @see javax.security.auth.callback.ConfirmationCallback
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java
index d9ef17a700f..03e1b14a5ff 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/CallbackHandler.java
@@ -63,6 +63,7 @@ package javax.security.auth.callback;
* All default handler implementations must provide a public
* zero-argument constructor.
*
+ * @since 1.4
* @see java.security.Security security properties
*/
public interface CallbackHandler {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java
index 26cfd23e30c..564a7984551 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/ChoiceCallback.java
@@ -31,6 +31,7 @@ package javax.security.auth.callback;
* method of a {@code CallbackHandler} to display a list of choices
* and to retrieve the selected choice(s).
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class ChoiceCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java
index 56fead57f0c..99bb5f8c17f 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/ConfirmationCallback.java
@@ -31,6 +31,7 @@ package javax.security.auth.callback;
* method of a {@code CallbackHandler} to ask for YES/NO,
* OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class ConfirmationCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java
index bcd2fdf0741..c0bf6e31896 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/LanguageCallback.java
@@ -33,6 +33,7 @@ import java.util.Locale;
* method of a {@code CallbackHandler} to retrieve the {@code Locale}
* used for localizing text.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class LanguageCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java
index 500f8d1ee10..5c289df2c43 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/NameCallback.java
@@ -30,6 +30,7 @@ package javax.security.auth.callback;
* {@code NameCallback} to the {@code handle}
* method of a {@code CallbackHandler} to retrieve name information.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class NameCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java
index b35eaa8d0e4..63e52fea112 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java
@@ -30,6 +30,7 @@ package javax.security.auth.callback;
* {@code PasswordCallback} to the {@code handle}
* method of a {@code CallbackHandler} to retrieve password information.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class PasswordCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java
index b9f93b73e44..0fea6a3c7d6 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextInputCallback.java
@@ -31,6 +31,7 @@ package javax.security.auth.callback;
* method of a {@code CallbackHandler} to retrieve generic text
* information.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class TextInputCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java
index 400a2c6e3ed..ba4551e3880 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/TextOutputCallback.java
@@ -31,6 +31,7 @@ package javax.security.auth.callback;
* method of a {@code CallbackHandler} to display information messages,
* warning messages and error messages.
*
+ * @since 1.4
* @see javax.security.auth.callback.CallbackHandler
*/
public class TextOutputCallback implements Callback, java.io.Serializable {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java b/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java
index 605a3e35ebb..be11761f7b2 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/callback/UnsupportedCallbackException.java
@@ -29,6 +29,7 @@ package javax.security.auth.callback;
* Signals that a {@code CallbackHandler} does not
* recognize a particular {@code Callback}.
*
+ * @since 1.4
*/
public class UnsupportedCallbackException extends Exception {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java
index 43dd84eb527..e979fc7cd52 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/AccountExpiredException.java
@@ -35,6 +35,7 @@ package javax.security.auth.login;
* throws this exception to notify the application. The application can
* then take the appropriate steps to notify the user.
*
+ * @since 1.4
*/
public class AccountExpiredException extends AccountException {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java b/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java
index 1e9acbf051a..f567b3be871 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/AppConfigurationEntry.java
@@ -39,6 +39,7 @@ import java.util.Collections;
* options. Please refer to the {@code Configuration} class for
* more information on the different control flags and their semantics.
*
+ * @since 1.4
* @see javax.security.auth.login.Configuration
*/
public class AppConfigurationEntry {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java
index 1f0b6c95597..e08bf3eb3d7 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/Configuration.java
@@ -182,6 +182,7 @@ import sun.security.jca.GetInstance;
* Java Security Standard Algorithm Names Specification
* for a list of standard Configuration types.
*
+ * @since 1.4
* @see javax.security.auth.login.LoginContext
* @see java.security.Security security properties
*/
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java
index 8e279bd604b..b0914d2c914 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/CredentialExpiredException.java
@@ -37,6 +37,7 @@ package javax.security.auth.login;
* the application. The application can then take the appropriate
* steps to assist the user in updating the password.
*
+ * @since 1.4
*/
public class CredentialExpiredException extends CredentialException {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java
index 895583138db..82170a99fc9 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/FailedLoginException.java
@@ -32,6 +32,7 @@ package javax.security.auth.login;
* For example, a {@code LoginModule} throws this exception if
* the user entered an incorrect password.
*
+ * @since 1.4
*/
public class FailedLoginException extends LoginException {
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java
index af46b200701..deaf3aac426 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginContext.java
@@ -182,6 +182,7 @@ import sun.security.util.ResourcesMgr;
*
*
*
+ * @since 1.4
* @see java.security.Security
* @see javax.security.auth.AuthPermission
* @see javax.security.auth.Subject
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java
index 065f57f986c..3861cfcf0b9 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/login/LoginException.java
@@ -28,6 +28,7 @@ package javax.security.auth.login;
/**
* This is the basic login exception.
*
+ * @since 1.4
* @see javax.security.auth.login.LoginContext
*/
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java b/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java
index 3206b5a5d27..1c19b7d8832 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/spi/LoginModule.java
@@ -122,6 +122,7 @@ import java.util.Map;
* no arguments. This allows classes which load the {@code LoginModule}
* to instantiate it.
*
+ * @since 1.4
* @see javax.security.auth.login.LoginContext
* @see javax.security.auth.login.Configuration
*/
diff --git a/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java b/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java
index e3a7fdbd7dc..a4f37a36818 100644
--- a/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java
+++ b/jdk/src/java.base/share/classes/javax/security/auth/x500/X500PrivateCredential.java
@@ -36,6 +36,7 @@ import javax.security.auth.Destroyable;
* This enables looking up the private credentials for an X.500 principal
* in a subject.
*
+ * @since 1.4
*/
public final class X500PrivateCredential implements Destroyable {
private X509Certificate cert;
diff --git a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java
index 6208565c74b..51a31da5e17 100644
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java
@@ -181,7 +181,7 @@ public final class Main {
enum Command {
CERTREQ("Generates.a.certificate.request",
ALIAS, SIGALG, FILEOUT, KEYPASS, KEYSTORE, DNAME,
- STOREPASS, STORETYPE, PROVIDERNAME, ADDPROVIDER,
+ EXT, STOREPASS, STORETYPE, PROVIDERNAME, ADDPROVIDER,
PROVIDERCLASS, PROVIDERPATH, V, PROTECTED),
CHANGEALIAS("Changes.an.entry.s.alias",
ALIAS, DESTALIAS, KEYPASS, KEYSTORE, CACERTS, STOREPASS,
@@ -250,12 +250,12 @@ public final class Main {
KEYSTORE, STOREPASS, PROVIDERNAME, ADDPROVIDER,
PROVIDERCLASS, PROVIDERPATH, V),
SELFCERT("Generates.a.self.signed.certificate",
- ALIAS, SIGALG, DNAME, STARTDATE, VALIDITY, KEYPASS,
+ ALIAS, SIGALG, DNAME, STARTDATE, EXT, VALIDITY, KEYPASS,
STORETYPE, KEYSTORE, STOREPASS, PROVIDERNAME,
ADDPROVIDER, PROVIDERCLASS, PROVIDERPATH, V),
GENCRL("Generates.CRL",
RFC, FILEOUT, ID,
- ALIAS, SIGALG, EXT, KEYPASS, KEYSTORE,
+ ALIAS, SIGALG, KEYPASS, KEYSTORE,
STOREPASS, STORETYPE, PROVIDERNAME, ADDPROVIDER,
PROVIDERCLASS, PROVIDERPATH, V, PROTECTED),
IDENTITYDB("Imports.entries.from.a.JDK.1.1.x.style.identity.database",
diff --git a/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java b/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java
index 54eade39044..acc0def2180 100644
--- a/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java
+++ b/jdk/src/java.base/share/classes/sun/security/util/DerInputBuffer.java
@@ -27,7 +27,6 @@ package sun.security.util;
import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.io.OutputStream;
import java.math.BigInteger;
import java.util.Date;
import sun.util.calendar.CalendarDate;
@@ -275,7 +274,7 @@ class DerInputBuffer extends ByteArrayInputStream implements Cloneable {
if (len > available())
throw new IOException("short read of DER Generalized Time");
- if (len < 13 || len > 23)
+ if (len < 13)
throw new IOException("DER Generalized Time length error");
return getTime(len, true);
@@ -350,7 +349,7 @@ class DerInputBuffer extends ByteArrayInputStream implements Cloneable {
*/
millis = 0;
- if (len > 2 && len < 12) {
+ if (len > 2) {
second = 10 * Character.digit((char)buf[pos++], 10);
second += Character.digit((char)buf[pos++], 10);
len -= 2;
@@ -358,31 +357,30 @@ class DerInputBuffer extends ByteArrayInputStream implements Cloneable {
if (buf[pos] == '.' || buf[pos] == ',') {
len --;
pos++;
- // handle upto milisecond precision only
int precision = 0;
- int peek = pos;
- while (buf[peek] != 'Z' &&
- buf[peek] != '+' &&
- buf[peek] != '-') {
- peek++;
+ while (buf[pos] != 'Z' &&
+ buf[pos] != '+' &&
+ buf[pos] != '-') {
+ // Validate all digits in the fractional part but
+ // store millisecond precision only
+ int thisDigit = Character.digit((char)buf[pos], 10);
precision++;
+ pos++;
+ switch (precision) {
+ case 1:
+ millis += 100 * thisDigit;
+ break;
+ case 2:
+ millis += 10 * thisDigit;
+ break;
+ case 3:
+ millis += thisDigit;
+ break;
+ }
}
- switch (precision) {
- case 3:
- millis += 100 * Character.digit((char)buf[pos++], 10);
- millis += 10 * Character.digit((char)buf[pos++], 10);
- millis += Character.digit((char)buf[pos++], 10);
- break;
- case 2:
- millis += 100 * Character.digit((char)buf[pos++], 10);
- millis += 10 * Character.digit((char)buf[pos++], 10);
- break;
- case 1:
- millis += 100 * Character.digit((char)buf[pos++], 10);
- break;
- default:
- throw new IOException("Parse " + type +
- " time, unsupported precision for seconds value");
+ if (precision == 0) {
+ throw new IOException("Parse " + type +
+ " time, empty fractional part");
}
len -= precision;
}
diff --git a/jdk/src/java.base/share/native/launcher/defines.h b/jdk/src/java.base/share/native/launcher/defines.h
index 4470ae5d466..1e4e35a044f 100644
--- a/jdk/src/java.base/share/native/launcher/defines.h
+++ b/jdk/src/java.base/share/native/launcher/defines.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -44,17 +44,24 @@
#define DOT_VERSION "0.0"
#ifdef JAVA_ARGS
-#define HAS_JAVA_ARGS JNI_TRUE
#ifdef PROGNAME
static const char* const_progname = PROGNAME;
#else
static char* const_progname = NULL;
#endif
static const char* const_jargs[] = JAVA_ARGS;
+#ifdef EXTRA_JAVA_ARGS
+static const char* const_extra_jargs[] = EXTRA_JAVA_ARGS;
+#else
+static const char** const_extra_jargs = NULL;
+#endif
#else /* !JAVA_ARGS */
-#define HAS_JAVA_ARGS JNI_FALSE
+#ifdef EXTRA_JAVA_ARGS
+#error "EXTRA_JAVA_ARGS defined without JAVA_ARGS"
+#endif
static const char* const_progname = "java";
static const char** const_jargs = NULL;
+static const char** const_extra_jargs = NULL;
static const char* const_appclasspath[] = { NULL };
#endif /* JAVA_ARGS */
diff --git a/jdk/src/java.base/share/native/launcher/main.c b/jdk/src/java.base/share/native/launcher/main.c
index 8e27a2a2ed9..5c743659fd4 100644
--- a/jdk/src/java.base/share/native/launcher/main.c
+++ b/jdk/src/java.base/share/native/launcher/main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 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
@@ -85,6 +85,8 @@ WinMain(HINSTANCE inst, HINSTANCE previnst, LPSTR cmdline, int cmdshow)
{
int margc;
char** margv;
+ int jargc;
+ char** jargv;
const jboolean const_javaw = JNI_TRUE;
__initenv = _environ;
@@ -95,10 +97,47 @@ main(int argc, char **argv)
{
int margc;
char** margv;
+ int jargc;
+ char** jargv;
const jboolean const_javaw = JNI_FALSE;
#endif /* JAVAW */
+ {
+ int i, main_jargc, extra_jargc;
+ JLI_List list;
- JLI_InitArgProcessing(!HAS_JAVA_ARGS, const_disable_argfile);
+ main_jargc = (sizeof(const_jargs) / sizeof(char *)) > 1
+ ? sizeof(const_jargs) / sizeof(char *)
+ : 0; // ignore the null terminator index
+
+ extra_jargc = (sizeof(const_extra_jargs) / sizeof(char *)) > 1
+ ? sizeof(const_extra_jargs) / sizeof(char *)
+ : 0; // ignore the null terminator index
+
+ if (main_jargc > 0 && extra_jargc > 0) { // combine extra java args
+ jargc = main_jargc + extra_jargc;
+ list = JLI_List_new(jargc + 1);
+
+ for (i = 0 ; i < extra_jargc; i++) {
+ JLI_List_add(list, JLI_StringDup(const_extra_jargs[i]));
+ }
+
+ for (i = 0 ; i < main_jargc ; i++) {
+ JLI_List_add(list, JLI_StringDup(const_jargs[i]));
+ }
+
+ // terminate the list
+ JLI_List_add(list, NULL);
+ jargv = list->elements;
+ } else if (extra_jargc > 0) { // should never happen
+ fprintf(stderr, "EXTRA_JAVA_ARGS defined without JAVA_ARGS");
+ abort();
+ } else { // no extra args, business as usual
+ jargc = main_jargc;
+ jargv = (char **) const_jargs;
+ }
+ }
+
+ JLI_InitArgProcessing(jargc > 0, const_disable_argfile);
#ifdef _WIN32
{
@@ -164,12 +203,12 @@ main(int argc, char **argv)
}
#endif /* WIN32 */
return JLI_Launch(margc, margv,
- sizeof(const_jargs) / sizeof(char *), const_jargs,
+ jargc, (const char**) jargv,
0, NULL,
VERSION_STRING,
DOT_VERSION,
(const_progname != NULL) ? const_progname : *margv,
(const_launcher != NULL) ? const_launcher : *margv,
- HAS_JAVA_ARGS,
+ jargc > 0,
const_cpwildcard, const_javaw, 0);
}
diff --git a/jdk/src/java.base/share/native/libjli/args.c b/jdk/src/java.base/share/native/libjli/args.c
index 9eb2317de6c..3d11f1cffa8 100644
--- a/jdk/src/java.base/share/native/libjli/args.c
+++ b/jdk/src/java.base/share/native/libjli/args.c
@@ -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
@@ -78,7 +78,7 @@ static size_t argsCount = 1;
static jboolean stopExpansion = JNI_FALSE;
static jboolean relaunch = JNI_FALSE;
-void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile) {
+void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile) {
// No expansion for relaunch
if (argsCount != 1) {
relaunch = JNI_TRUE;
@@ -91,7 +91,7 @@ void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile) {
expectingNoDashArg = JNI_FALSE;
// for tools, this value remains 0 all the time.
- firstAppArgIndex = isJava ? NOT_FOUND : 0;
+ firstAppArgIndex = hasJavaArgs ? 0: NOT_FOUND;
}
int JLI_GetAppArgIndex() {
diff --git a/jdk/src/java.base/share/native/libjli/java.c b/jdk/src/java.base/share/native/libjli/java.c
index 8967f70bc98..e1c13354e80 100644
--- a/jdk/src/java.base/share/native/libjli/java.c
+++ b/jdk/src/java.base/share/native/libjli/java.c
@@ -246,6 +246,10 @@ JLI_Launch(int argc, char ** argv, /* main argc, argc */
DumpState();
if (JLI_IsTraceLauncher()) {
int i;
+ printf("Java args:\n");
+ for (i = 0; i < jargc ; i++) {
+ printf("jargv[%d] = %s\n", i, jargv[i]);
+ }
printf("Command line args:\n");
for (i = 0; i < argc ; i++) {
printf("argv[%d] = %s\n", i, argv[i]);
diff --git a/jdk/src/java.base/share/native/libjli/jli_util.h b/jdk/src/java.base/share/native/libjli/jli_util.h
index b4e8a69b3eb..34b1c029509 100644
--- a/jdk/src/java.base/share/native/libjli/jli_util.h
+++ b/jdk/src/java.base/share/native/libjli/jli_util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -133,7 +133,7 @@ char *JLI_List_combine(JLI_List sl);
char *JLI_List_join(JLI_List l, char sep);
JLI_List JLI_List_split(const char *str, char sep);
-void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile);
+void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
JLI_List JLI_PreprocessArg(const char *arg);
jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
index 6211692d5c9..b1a90285d10 100644
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Clipboard.java
@@ -48,6 +48,7 @@ import java.io.IOException;
*
* @author Amy Fowler
* @author Alexander Gerasimov
+ * @since 1.1
*/
public class Clipboard {
diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java
index 4c68a3b5624..bc5e239be2d 100644
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/ClipboardOwner.java
@@ -39,6 +39,7 @@ package java.awt.datatransfer;
* @see java.awt.datatransfer.Clipboard
*
* @author Amy Fowler
+ * @since 1.1
*/
public interface ClipboardOwner {
diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java
index 7cc256e9e6d..701957ed795 100644
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java
@@ -112,6 +112,7 @@ import java.util.Objects;
* @author Blake Sullivan
* @author Laurence P. G. Cable
* @author Jeff Dunn
+ * @since 1.1
*/
public class DataFlavor implements Externalizable, Cloneable {
diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java
index aecf3f40f52..03817dbde74 100644
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/StringSelection.java
@@ -39,6 +39,7 @@ import java.io.*;
* and all equivalent flavors is deprecated. No other
* DataFlavors are supported.
*
+ * @since 1.1
* @see java.awt.datatransfer.DataFlavor#stringFlavor
* @see java.awt.datatransfer.DataFlavor#plainTextFlavor
*/
diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java
index 3ba437748ab..fdb947ab05c 100644
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/Transferable.java
@@ -37,6 +37,7 @@ import java.io.IOException;
* a section in The Java Tutorial, for more information.
*
* @author Amy Fowler
+ * @since 1.1
*/
public interface Transferable {
diff --git a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java
index b3d9f17d21c..11ecbd1ab5d 100644
--- a/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java
+++ b/jdk/src/java.datatransfer/share/classes/java/awt/datatransfer/UnsupportedFlavorException.java
@@ -30,6 +30,7 @@ package java.awt.datatransfer;
* @see Transferable#getTransferData
*
* @author Amy Fowler
+ * @since 1.1
*/
public class UnsupportedFlavorException extends Exception {
diff --git a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java
index d45cfac685e..6b75a2a6ecb 100644
--- a/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java
+++ b/jdk/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java
@@ -102,10 +102,10 @@ public class RegistryImpl extends java.rmi.server.RemoteServer
private static final String REGISTRY_FILTER_PROPNAME = "sun.rmi.registry.registryFilter";
/** Registry max depth of remote invocations. **/
- private static int REGISTRY_MAX_DEPTH = 5;
+ private static final int REGISTRY_MAX_DEPTH = 20;
/** Registry maximum array size in remote invocations. **/
- private static int REGISTRY_MAX_ARRAY_SIZE = 10000;
+ private static final int REGISTRY_MAX_ARRAY_SIZE = 10000;
/**
* The registryFilter created from the value of the {@code "sun.rmi.registry.registryFilter"}
diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java
index 45f12aab1bc..44e34eef5b9 100644
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiExchange.java
@@ -316,13 +316,14 @@ class MultiExchange {
})
// 5. Handle errors and cancel any timer set
.handle((response, ex) -> {
- if (response != null) {
+ cancelTimer();
+ if (ex == null) {
+ assert response != null;
return MinimalFuture.completedFuture(response);
}
// all exceptions thrown are handled here
CompletableFuture error = getExceptionalCF(ex);
if (error == null) {
- cancelTimer();
return responseAsyncImpl();
} else {
return error;
diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java
index ec0f4d0e00f..34fed7e7166 100644
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/SSLDelegate.java
@@ -274,9 +274,7 @@ class SSLDelegate {
int x;
do {
if (needData) {
- do {
- x = chan.read (unwrap_src);
- } while (x == 0);
+ x = chan.read (unwrap_src);
if (x == -1) {
throw new IOException ("connection closed for reading");
}
diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java
index 4168da9b52b..8812d442794 100644
--- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java
+++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/Receiver.java
@@ -28,7 +28,6 @@ package jdk.incubator.http.internal.websocket;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
/*
@@ -58,23 +57,24 @@ final class Receiver {
private final Frame.Reader reader = new Frame.Reader();
private final RawChannel.RawEvent event = createHandler();
private final AtomicLong demand = new AtomicLong();
- private final CooperativeHandler handler =
- new CooperativeHandler(this::pushContinuously);
- /*
- * Used to ensure registering the channel event at most once (i.e. to avoid
- * multiple registrations).
- */
- private final AtomicBoolean readable = new AtomicBoolean();
+ private final CooperativeHandler handler;
+
private ByteBuffer data;
+ private volatile int state;
+
+ private static final int UNREGISTERED = 0;
+ private static final int AVAILABLE = 1;
+ private static final int WAITING = 2;
Receiver(MessageStreamConsumer messageConsumer, RawChannel channel) {
this.messageConsumer = messageConsumer;
this.channel = channel;
- this.data = channel.initialByteBuffer();
this.frameConsumer = new FrameConsumer(this.messageConsumer);
- // To ensure the initial non-final `data` will be read correctly
- // (happens-before) by reader after executing readable.get()
- readable.set(true);
+ this.data = channel.initialByteBuffer();
+ // To ensure the initial non-final `data` will be visible
+ // (happens-before) when `handler` invokes `pushContinuously`
+ // the following assignment is done last:
+ handler = new CooperativeHandler(this::pushContinuously);
}
private RawChannel.RawEvent createHandler() {
@@ -87,7 +87,7 @@ final class Receiver {
@Override
public void handle() {
- readable.set(true);
+ state = AVAILABLE;
handler.handle();
}
};
@@ -110,54 +110,63 @@ final class Receiver {
/*
* Stops the machinery from reading and delivering messages permanently,
- * regardless of the current demand.
+ * regardless of the current demand and data availability.
*/
void close() {
handler.stop();
}
private void pushContinuously() {
- while (readable.get() && demand.get() > 0 && !handler.isStopped()) {
- pushOnce();
- }
- }
-
- private void pushOnce() {
- if (data == null && !readData()) {
- return;
- }
- try {
- reader.readFrame(data, frameConsumer); // Pushing frame parts to the consumer
- } catch (FailWebSocketException e) {
- messageConsumer.onError(e);
- return;
- }
- if (!data.hasRemaining()) {
- data = null;
- }
- }
-
- private boolean readData() {
- try {
- data = channel.read();
- } catch (IOException e) {
- messageConsumer.onError(e);
- return false;
- }
- if (data == null) { // EOF
- messageConsumer.onComplete();
- return false;
- } else if (!data.hasRemaining()) { // No data in the socket at the moment
- data = null;
- readable.set(false);
- try {
- channel.registerEvent(event);
- } catch (IOException e) {
- messageConsumer.onError(e);
+ while (!handler.isStopped()) {
+ if (data.hasRemaining()) {
+ if (demand.get() > 0) {
+ try {
+ int oldPos = data.position();
+ reader.readFrame(data, frameConsumer);
+ int newPos = data.position();
+ assert oldPos != newPos : data; // reader always consumes bytes
+ } catch (FailWebSocketException e) {
+ handler.stop();
+ messageConsumer.onError(e);
+ }
+ continue;
+ }
+ break;
+ }
+ switch (state) {
+ case WAITING:
+ return;
+ case UNREGISTERED:
+ try {
+ state = WAITING;
+ channel.registerEvent(event);
+ } catch (IOException e) {
+ handler.stop();
+ messageConsumer.onError(e);
+ }
+ return;
+ case AVAILABLE:
+ try {
+ data = channel.read();
+ } catch (IOException e) {
+ handler.stop();
+ messageConsumer.onError(e);
+ return;
+ }
+ if (data == null) { // EOF
+ handler.stop();
+ messageConsumer.onComplete();
+ return;
+ } else if (!data.hasRemaining()) { // No data at the moment
+ // Pretty much a "goto", reusing the existing code path
+ // for registration
+ state = UNREGISTERED;
+ }
+ continue;
+ default:
+ throw new InternalError(String.valueOf(state));
}
- return false;
}
- assert data.hasRemaining();
- return true;
}
}
+
diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT
index b9cb4a27a3f..41cb9e82c8d 100644
--- a/jdk/test/TEST.ROOT
+++ b/jdk/test/TEST.ROOT
@@ -10,7 +10,7 @@
# randomness tests.
#
# A "headful" test requires a graphical environment to meaningfully
-# run. Tests that are not headful are "headless."
+# run. Tests that are not headful are "headless."
keys=2d dnd i18n intermittent randomness headful
@@ -18,7 +18,7 @@ keys=2d dnd i18n intermittent randomness headful
othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle
# Tests that cannot run concurrently
-exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream java/util/BitSet/stream javax/rmi com/sun/corba/cachedSocket
+exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream java/util/Arrays/largeMemory java/util/BitSet/stream javax/rmi com/sun/corba/cachedSocket
# Group definitions
groups=TEST.groups [closed/TEST.groups]
diff --git a/jdk/test/TEST.groups b/jdk/test/TEST.groups
index 07f876ce3db..11da7640e98 100644
--- a/jdk/test/TEST.groups
+++ b/jdk/test/TEST.groups
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -641,6 +641,7 @@ needs_compact3 = \
java/security/PermissionCollection/Concurrent.java \
java/security/Principal/Implies.java \
java/security/cert/GetInstance.java \
+ java/util/Arrays/largeMemory/ParallelPrefix.java \
java/util/logging/DrainFindDeadlockTest.java \
java/util/logging/LoggingMXBeanTest.java \
java/util/logging/TestLogConfigurationDeadLock.java \
@@ -709,7 +710,6 @@ needs_compact2 = \
java/nio/Buffer/Chars.java \
java/nio/file/Files/StreamTest.java \
java/security/BasicPermission/Wildcard.java \
- java/util/Arrays/ParallelPrefix.java \
java/util/Arrays/SetAllTest.java \
java/util/BitSet/stream/BitSetStreamTest.java \
java/util/Collection/CollectionDefaults.java \
diff --git a/jdk/test/com/sun/corba/7130985/CorbaExceptionsCompileTest.java b/jdk/test/com/sun/corba/7130985/CorbaExceptionsCompileTest.java
index c4eaa555e9a..58bc6ee2a5d 100644
--- a/jdk/test/com/sun/corba/7130985/CorbaExceptionsCompileTest.java
+++ b/jdk/test/com/sun/corba/7130985/CorbaExceptionsCompileTest.java
@@ -26,8 +26,10 @@
* @bug 7130985
* @summary Four helper classes missing in Sun JDK
* @library /lib/testlibrary /test/lib
- * @build jdk.testlibrary.*
* @modules java.corba
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * jdk.testlibrary.*
* @run main CorbaExceptionsCompileTest
*/
diff --git a/jdk/test/com/sun/crypto/provider/CICO/PBEFunc/CipherNCFuncTest.java b/jdk/test/com/sun/crypto/provider/CICO/PBEFunc/CipherNCFuncTest.java
index c923edb2a1a..c133f11b2d1 100644
--- a/jdk/test/com/sun/crypto/provider/CICO/PBEFunc/CipherNCFuncTest.java
+++ b/jdk/test/com/sun/crypto/provider/CICO/PBEFunc/CipherNCFuncTest.java
@@ -25,6 +25,8 @@
* @test
* @bug 8048604
* @library ../ /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run main CipherNCFuncTest
* @summary This test verifies the assertion "There should be no transformation
* on the plaintext/ciphertext in encryption/decryption mechanism" for
* feature "NullCipher".
diff --git a/jdk/test/java/io/FilePermission/FilePermissionCollectionMerge.java b/jdk/test/java/io/FilePermission/FilePermissionCollectionMerge.java
index c85be3d6fde..b8964931f30 100644
--- a/jdk/test/java/io/FilePermission/FilePermissionCollectionMerge.java
+++ b/jdk/test/java/io/FilePermission/FilePermissionCollectionMerge.java
@@ -28,6 +28,8 @@
* @summary FilePermissionCollection merges incorrectly
* @modules java.base/sun.security.util
* @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main FilePermissionCollectionMerge
*/
import sun.security.util.FilePermCompat;
diff --git a/jdk/test/java/io/FilePermission/Invalid.java b/jdk/test/java/io/FilePermission/Invalid.java
index 2a343d7049c..f9cf20da1ca 100644
--- a/jdk/test/java/io/FilePermission/Invalid.java
+++ b/jdk/test/java/io/FilePermission/Invalid.java
@@ -27,6 +27,8 @@
* @bug 8167646
* @summary Better invalid FilePermission
* @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main Invalid
*/
import jdk.test.lib.Asserts;
diff --git a/jdk/test/java/io/FilePermission/MergeName.java b/jdk/test/java/io/FilePermission/MergeName.java
index 09215877fd8..c2eff765f2d 100644
--- a/jdk/test/java/io/FilePermission/MergeName.java
+++ b/jdk/test/java/io/FilePermission/MergeName.java
@@ -37,6 +37,13 @@ import java.util.stream.IntStream;
* @bug 8170364
* @summary FilePermission path modified during merge
* @library /test/lib
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * @run main MergeName
*/
public class MergeName {
diff --git a/jdk/test/java/io/FilePermission/ReadFileOnPath.java b/jdk/test/java/io/FilePermission/ReadFileOnPath.java
index b106b7b5968..3d8a60aa089 100644
--- a/jdk/test/java/io/FilePermission/ReadFileOnPath.java
+++ b/jdk/test/java/io/FilePermission/ReadFileOnPath.java
@@ -27,6 +27,13 @@
* @library /lib/testlibrary /test/lib
* @modules java.base/jdk.internal.misc
* jdk.compiler
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main ReadFileOnPath
* @summary Still able to read file on the same path
*/
diff --git a/jdk/test/java/io/InputStream/ReadAllBytes.java b/jdk/test/java/io/InputStream/ReadAllBytes.java
index 88ab4d66791..c190cd2dd54 100644
--- a/jdk/test/java/io/InputStream/ReadAllBytes.java
+++ b/jdk/test/java/io/InputStream/ReadAllBytes.java
@@ -33,6 +33,7 @@ import jdk.test.lib.RandomFactory;
* @test
* @bug 8080835
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main ReadAllBytes
* @summary Basic test for InputStream.readAllBytes
* @key randomness
diff --git a/jdk/test/java/io/InputStream/ReadNBytes.java b/jdk/test/java/io/InputStream/ReadNBytes.java
index 3b3999f1647..1fbca35d3bb 100644
--- a/jdk/test/java/io/InputStream/ReadNBytes.java
+++ b/jdk/test/java/io/InputStream/ReadNBytes.java
@@ -33,6 +33,7 @@ import jdk.test.lib.RandomFactory;
* @test
* @bug 8080835
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main ReadNBytes
* @summary Basic test for InputStream.readNBytes
* @key randomness
diff --git a/jdk/test/java/io/Serializable/class/NonSerializableTest.java b/jdk/test/java/io/Serializable/class/NonSerializableTest.java
index 53f4a44c860..b2ac4e933cb 100644
--- a/jdk/test/java/io/Serializable/class/NonSerializableTest.java
+++ b/jdk/test/java/io/Serializable/class/NonSerializableTest.java
@@ -25,8 +25,13 @@
* @test
* @bug 4075221
* @library /test/lib
- * @build jdk.test.lib.compiler.*
- * @build jdk.test.lib.process.*
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng/timeout=300 NonSerializableTest
* @summary Enable serialize of nonSerializable Class descriptor.
*/
diff --git a/jdk/test/java/io/Serializable/evolution/RenamePackage/RenamePackageTest.java b/jdk/test/java/io/Serializable/evolution/RenamePackage/RenamePackageTest.java
index 10456827f78..7a3da8e04d5 100644
--- a/jdk/test/java/io/Serializable/evolution/RenamePackage/RenamePackageTest.java
+++ b/jdk/test/java/io/Serializable/evolution/RenamePackage/RenamePackageTest.java
@@ -26,7 +26,12 @@
* @bug 4087295 4785472
* @library /test/lib
* @build jdk.test.lib.compiler.CompilerUtils
- * @build jdk.test.lib.process.ProcessTools
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @build RenamePackageTest
* @run main RenamePackageTest
* @summary Enable resolveClass() to accommodate package renaming.
diff --git a/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java b/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java
index f20f3f44539..8be6ce1142b 100644
--- a/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java
+++ b/jdk/test/java/io/Serializable/failureAtomicity/FailureAtomicity.java
@@ -27,6 +27,8 @@
* @summary Better failure atomicity for default read object.
* @modules jdk.compiler
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @compile FailureAtomicity.java SerialRef.java
* @run main failureAtomicity.FailureAtomicity
*/
diff --git a/jdk/test/java/io/Serializable/serialver/classpath/ClasspathTest.java b/jdk/test/java/io/Serializable/serialver/classpath/ClasspathTest.java
index b4cb6085321..92986eb5aea 100644
--- a/jdk/test/java/io/Serializable/serialver/classpath/ClasspathTest.java
+++ b/jdk/test/java/io/Serializable/serialver/classpath/ClasspathTest.java
@@ -25,8 +25,12 @@
* @test
* @bug 4035147 4785472
* @library /test/lib
+ * @build jdk.test.lib.Utils
+ * @build jdk.test.lib.Asserts
+ * @build jdk.test.lib.JDKToolFinder
* @build jdk.test.lib.JDKToolLauncher
- * @build jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Platform
+ * @build jdk.test.lib.process.*
* @build ClasspathTest
* @run main serialver.ClasspathTest
* @summary Test the use of the -classpath switch in the serialver application.
diff --git a/jdk/test/java/io/Serializable/serialver/nested/NestedTest.java b/jdk/test/java/io/Serializable/serialver/nested/NestedTest.java
index 160a931d9da..9b8963b355e 100644
--- a/jdk/test/java/io/Serializable/serialver/nested/NestedTest.java
+++ b/jdk/test/java/io/Serializable/serialver/nested/NestedTest.java
@@ -25,8 +25,12 @@
* @test
* @bug 4312217 4785473
* @library /test/lib
- * @build jdk.test.lib.JDKToolLauncher
- * @build jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @build NestedTest
* @run main serialver.NestedTest
* @summary To test the use of nested class specification using the '.'
diff --git a/jdk/test/java/lang/Class/forName/modules/TestDriver.java b/jdk/test/java/lang/Class/forName/modules/TestDriver.java
index db5323cabd0..ad14b3969c8 100644
--- a/jdk/test/java/lang/Class/forName/modules/TestDriver.java
+++ b/jdk/test/java/lang/Class/forName/modules/TestDriver.java
@@ -43,7 +43,10 @@ import static org.testng.Assert.assertTrue;
* @summary Tests for Class.forName(Module,String)
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler
- * @build jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.ProcessTools
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.compiler.CompilerUtils
+ * jdk.testlibrary.ProcessTools
* TestDriver TestMain TestLayer
* @run testng TestDriver
*/
diff --git a/jdk/test/java/lang/Double/ParseHexFloatingPoint.java b/jdk/test/java/lang/Double/ParseHexFloatingPoint.java
index 39f8f750e18..a26a8b7a756 100644
--- a/jdk/test/java/lang/Double/ParseHexFloatingPoint.java
+++ b/jdk/test/java/lang/Double/ParseHexFloatingPoint.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main ParseHexFloatingPoint
* @bug 4826774 8078672
* @summary Numerical tests for hexadecimal inputs to parse{Double, Float} (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Integer/BitTwiddle.java b/jdk/test/java/lang/Integer/BitTwiddle.java
index 9fc710c513e..efa8c411331 100644
--- a/jdk/test/java/lang/Integer/BitTwiddle.java
+++ b/jdk/test/java/lang/Integer/BitTwiddle.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main BitTwiddle
* @bug 4495754 8078672
* @summary Basic test for int bit twiddling (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Long/BitTwiddle.java b/jdk/test/java/lang/Long/BitTwiddle.java
index 52925458420..7502d40aff3 100644
--- a/jdk/test/java/lang/Long/BitTwiddle.java
+++ b/jdk/test/java/lang/Long/BitTwiddle.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main BitTwiddle
* @bug 4495754 8078672
* @summary Basic test for long bit twiddling (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Math/CubeRootTests.java b/jdk/test/java/lang/Math/CubeRootTests.java
index 7dd4a18b81c..53ef270377f 100644
--- a/jdk/test/java/lang/Math/CubeRootTests.java
+++ b/jdk/test/java/lang/Math/CubeRootTests.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main CubeRootTests
* @bug 4347132 4939441 8078672
* @summary Tests for {Math, StrictMath}.cbrt (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Math/HypotTests.java b/jdk/test/java/lang/Math/HypotTests.java
index a55549f12f1..0f31a8881f8 100644
--- a/jdk/test/java/lang/Math/HypotTests.java
+++ b/jdk/test/java/lang/Math/HypotTests.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main HypotTests
* @bug 4851638 4939441 8078672
* @summary Tests for {Math, StrictMath}.hypot (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Math/IeeeRecommendedTests.java b/jdk/test/java/lang/Math/IeeeRecommendedTests.java
index 8315fa74ba1..830b16d765a 100644
--- a/jdk/test/java/lang/Math/IeeeRecommendedTests.java
+++ b/jdk/test/java/lang/Math/IeeeRecommendedTests.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main IeeeRecommendedTests
* @bug 4860891 4826732 4780454 4939441 4826652 8078672
* @summary Tests for IEEE 754[R] recommended functions and similar methods (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Math/Log1pTests.java b/jdk/test/java/lang/Math/Log1pTests.java
index b1dde3ab965..021a651ed18 100644
--- a/jdk/test/java/lang/Math/Log1pTests.java
+++ b/jdk/test/java/lang/Math/Log1pTests.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main Log1pTests
* @bug 4851638 4939441 8078672
* @summary Tests for {Math, StrictMath}.log1p (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/Math/MultiplicationTests.java b/jdk/test/java/lang/Math/MultiplicationTests.java
index 1bc29d092ef..4fbb787e083 100644
--- a/jdk/test/java/lang/Math/MultiplicationTests.java
+++ b/jdk/test/java/lang/Math/MultiplicationTests.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main MultiplicationTests
* @bug 5100935
* @summary Tests for multiplication methods (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/lang/ProcessHandle/Basic.java b/jdk/test/java/lang/ProcessHandle/Basic.java
index 34e1021a340..09674814283 100644
--- a/jdk/test/java/lang/ProcessHandle/Basic.java
+++ b/jdk/test/java/lang/ProcessHandle/Basic.java
@@ -39,6 +39,12 @@ import org.testng.annotations.Test;
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng Basic
* @summary Basic tests for ProcessHandler
* @author Roger Riggs
diff --git a/jdk/test/java/lang/ProcessHandle/InfoTest.java b/jdk/test/java/lang/ProcessHandle/InfoTest.java
index fbd855db91d..8f6201ff6bf 100644
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java
@@ -51,7 +51,12 @@ import org.testng.annotations.Test;
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
- * @build jdk.test.lib.Platform jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng InfoTest
* @summary Functions of ProcessHandle.Info
* @author Roger Riggs
diff --git a/jdk/test/java/lang/ProcessHandle/OnExitTest.java b/jdk/test/java/lang/ProcessHandle/OnExitTest.java
index 9bdc566fcb1..444143782e9 100644
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java
@@ -43,7 +43,12 @@ import org.testng.TestNG;
* @library /test/lib
* @modules java.base/jdk.internal.misc
* jdk.management
- * @build jdk.test.lib.Platform jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng OnExitTest
* @summary Functions of Process.onExit and ProcessHandle.onExit
* @author Roger Riggs
diff --git a/jdk/test/java/lang/ProcessHandle/TreeTest.java b/jdk/test/java/lang/ProcessHandle/TreeTest.java
index 8e3580a4a84..854734c1c86 100644
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java
@@ -48,6 +48,11 @@ import org.testng.annotations.Test;
* @modules java.base/jdk.internal.misc
* jdk.management
* @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng/othervm TreeTest
* @summary Test counting and JavaChild.spawning and counting of Processes.
* @author Roger Riggs
diff --git a/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java b/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java
index f723b972561..58572496295 100644
--- a/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java
+++ b/jdk/test/java/lang/StackTraceElement/WithClassLoaderName.java
@@ -27,7 +27,8 @@
* @summary Basic test StackTraceElement with class loader names
* @library lib /lib/testlibrary /test/lib
* @modules jdk.compiler
- * @build m1/* WithClassLoaderName
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * m1/* WithClassLoaderName
* @run main/othervm m1/com.app.Main
* @run main/othervm WithClassLoaderName
*/
diff --git a/jdk/test/java/lang/StackWalker/StackWalkTest.java b/jdk/test/java/lang/StackWalker/StackWalkTest.java
index 9d4dd991e65..ad7a2c463ec 100644
--- a/jdk/test/java/lang/StackWalker/StackWalkTest.java
+++ b/jdk/test/java/lang/StackWalker/StackWalkTest.java
@@ -38,6 +38,7 @@ import jdk.test.lib.RandomFactory;
* @bug 8140450
* @summary Stack Walk Test (use -Dseed=X to set PRNG seed)
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @compile StackRecorderUtil.java
* @run main/othervm StackWalkTest
* @run main/othervm/java.security.policy=stackwalktest.policy StackWalkTest
diff --git a/jdk/test/java/lang/StrictMath/CubeRootTests.java b/jdk/test/java/lang/StrictMath/CubeRootTests.java
index 094150010a0..f4a3978075d 100644
--- a/jdk/test/java/lang/StrictMath/CubeRootTests.java
+++ b/jdk/test/java/lang/StrictMath/CubeRootTests.java
@@ -26,6 +26,7 @@
* @bug 4347132 8136799
* @key randomness
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @build Tests
* @build FdlibmTranslit
* @build CubeRootTests
diff --git a/jdk/test/java/lang/StrictMath/ExpTests.java b/jdk/test/java/lang/StrictMath/ExpTests.java
index ec463f2cbee..9c4b9b20801 100644
--- a/jdk/test/java/lang/StrictMath/ExpTests.java
+++ b/jdk/test/java/lang/StrictMath/ExpTests.java
@@ -26,6 +26,7 @@
* @bug 8139688
* @key randomness
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @build Tests
* @build FdlibmTranslit
* @build ExpTests
diff --git a/jdk/test/java/lang/StrictMath/HypotTests.java b/jdk/test/java/lang/StrictMath/HypotTests.java
index 6fa4cdeafca..0b1dd41691f 100644
--- a/jdk/test/java/lang/StrictMath/HypotTests.java
+++ b/jdk/test/java/lang/StrictMath/HypotTests.java
@@ -27,6 +27,7 @@
* @key randomness
* @summary Tests for StrictMath.hypot
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @build Tests
* @build FdlibmTranslit
* @build HypotTests
diff --git a/jdk/test/java/lang/String/CompactString/SerializationTest.java b/jdk/test/java/lang/String/CompactString/SerializationTest.java
index 94fa9aadabf..3ef08924233 100644
--- a/jdk/test/java/lang/String/CompactString/SerializationTest.java
+++ b/jdk/test/java/lang/String/CompactString/SerializationTest.java
@@ -31,6 +31,7 @@ import static org.testng.Assert.assertEquals;
* @test
* @bug 8077559
* @library /test/lib
+ * @build jdk.test.lib.util.SerializationUtils
* @summary Tests Compact String. This one is testing String serialization
* among -XX:+CompactStrings/-XX:-CompactStrings/LegacyString
* @run testng/othervm -XX:+CompactStrings SerializationTest
diff --git a/jdk/test/java/lang/String/LiteralReplace.java b/jdk/test/java/lang/String/LiteralReplace.java
index 4a3541986db..5e1638bcedf 100644
--- a/jdk/test/java/lang/String/LiteralReplace.java
+++ b/jdk/test/java/lang/String/LiteralReplace.java
@@ -24,6 +24,7 @@
/* @test
* @bug 8058779 8054307
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run testng LiteralReplace
* @summary Basic tests of String.replace(CharSequence, CharSequence)
* @key randomness
diff --git a/jdk/test/java/lang/StringBuffer/CompactStringBufferSerialization.java b/jdk/test/java/lang/StringBuffer/CompactStringBufferSerialization.java
index 3f721d52959..8e166a6b623 100644
--- a/jdk/test/java/lang/StringBuffer/CompactStringBufferSerialization.java
+++ b/jdk/test/java/lang/StringBuffer/CompactStringBufferSerialization.java
@@ -33,6 +33,7 @@ import static org.testng.Assert.*;
* @test
* @bug 8077559
* @library /test/lib
+ * @build jdk.test.lib.util.SerializationUtils
* @summary Tests Compact String. This one is testing StringBuffer serialization
* among -XX:+CompactStrings/-XX:-CompactStrings/LegacyStringBuffer
* @run testng/othervm -XX:+CompactStrings CompactStringBufferSerialization
diff --git a/jdk/test/java/lang/StringBuilder/CompactStringBuilderSerialization.java b/jdk/test/java/lang/StringBuilder/CompactStringBuilderSerialization.java
index 6a66e2b9dd2..931c71fd5d6 100644
--- a/jdk/test/java/lang/StringBuilder/CompactStringBuilderSerialization.java
+++ b/jdk/test/java/lang/StringBuilder/CompactStringBuilderSerialization.java
@@ -33,6 +33,7 @@ import static org.testng.Assert.*;
* @test
* @bug 8077559
* @library /test/lib
+ * @build jdk.test.lib.util.SerializationUtils
* @summary Tests Compact String. This one is testing StringBuilder serialization
* among -XX:+CompactStrings/-XX:-CompactStrings/LegacyStringBuilder
* @run testng/othervm -XX:+CompactStrings CompactStringBuilderSerialization
diff --git a/jdk/test/java/lang/Thread/ThreadStateTest.java b/jdk/test/java/lang/Thread/ThreadStateTest.java
index 6509e391099..1377c550226 100644
--- a/jdk/test/java/lang/Thread/ThreadStateTest.java
+++ b/jdk/test/java/lang/Thread/ThreadStateTest.java
@@ -33,6 +33,7 @@ import static java.lang.Thread.State.*;
* @library /lib/testlibrary
* @library /test/lib
* @build jdk.testlibrary.*
+ * @build jdk.test.lib.LockFreeLogger
* @build ThreadStateTest ThreadStateController
* @run main/othervm -Xmixed ThreadStateTest
*/
diff --git a/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java b/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java
index de1c2de4ce8..91be7bdb253 100644
--- a/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java
+++ b/jdk/test/java/lang/invoke/LFCaching/LFGarbageCollectedTest.java
@@ -29,6 +29,7 @@
* @summary Test verifies that lambda forms are garbage collected
* @author kshefov
* @library /lib/testlibrary /java/lang/invoke/common
+ * @build jdk.test.lib.TimeLimitedRunner
* @build TestMethods
* @build LambdaFormTestCase
* @build LFGarbageCollectedTest
diff --git a/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java b/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
index 3a4310a4319..bd9ace8ccbe 100644
--- a/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
+++ b/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java
@@ -27,10 +27,11 @@
* @key randomness
* @summary Test verifies that lambda forms are cached when run with multiple threads
* @author kshefov
- * @library /lib/testlibrary /java/lang/invoke/common
+ * @library /lib/testlibrary /java/lang/invoke/common /test/lib
* @modules java.base/java.lang.invoke:open
* java.base/java.lang.ref:open
* java.management
+ * @build jdk.test.lib.TimeLimitedRunner
* @build TestMethods
* @build LambdaFormTestCase
* @build LFCachingTestCase
diff --git a/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java b/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java
index 5ca5eb91a11..5427fba792e 100644
--- a/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java
+++ b/jdk/test/java/lang/invoke/LFCaching/LFSingleThreadCachingTest.java
@@ -27,10 +27,11 @@
* @key randomness
* @summary Test verifies that lambda forms are cached when run with single thread
* @author kshefov
- * @library /lib/testlibrary /java/lang/invoke/common
+ * @library /lib/testlibrary /java/lang/invoke/common /test/lib
* @modules java.base/java.lang.ref:open
* java.base/java.lang.invoke:open
* java.management
+ * @build jdk.test.lib.TimeLimitedRunner
* @build TestMethods
* @build LambdaFormTestCase
* @build LFCachingTestCase
diff --git a/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java b/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java
index 33a08ecd9bf..1bce3484110 100644
--- a/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java
+++ b/jdk/test/java/lang/invoke/LFCaching/LambdaFormTestCase.java
@@ -21,7 +21,7 @@
* questions.
*/
-import jdk.testlibrary.TimeLimitedRunner;
+import jdk.test.lib.TimeLimitedRunner;
import jdk.testlibrary.Utils;
import test.java.lang.invoke.lib.CodeCacheOverflowProcessor;
import test.java.lang.invoke.lib.Helper;
diff --git a/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java b/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java
index 747c8bb8e4a..de2bec2c198 100644
--- a/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java
+++ b/jdk/test/java/lang/invoke/MethodHandles/CatchExceptionTest.java
@@ -23,8 +23,8 @@
package test.java.lang.invoke.MethodHandles;
+import jdk.test.lib.TimeLimitedRunner;
import jdk.testlibrary.Asserts;
-import jdk.testlibrary.TimeLimitedRunner;
import jdk.testlibrary.Utils;
import test.java.lang.invoke.lib.CodeCacheOverflowProcessor;
import test.java.lang.invoke.lib.Helper;
@@ -43,7 +43,8 @@ import java.util.function.Function;
import java.util.function.Supplier;
/* @test
- * @library /lib/testlibrary /java/lang/invoke/common
+ * @library /lib/testlibrary /java/lang/invoke/common /test/lib
+ * @build jdk.test.lib.TimeLimitedRunner
* @compile CatchExceptionTest.java
* @run main/othervm -esa test.java.lang.invoke.MethodHandles.CatchExceptionTest
* @key intermittent randomness
diff --git a/jdk/test/java/lang/ref/CleanerTest.java b/jdk/test/java/lang/ref/CleanerTest.java
index c6778669f00..f7ab46f50d9 100644
--- a/jdk/test/java/lang/ref/CleanerTest.java
+++ b/jdk/test/java/lang/ref/CleanerTest.java
@@ -51,7 +51,12 @@ import org.testng.annotations.Test;
* @test
* @library /lib/testlibrary /test/lib
* @build sun.hotspot.WhiteBox
- * @build jdk.test.lib.Utils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @modules java.base/jdk.internal
* java.base/jdk.internal.misc
* java.base/jdk.internal.ref
diff --git a/jdk/test/java/math/BigDecimal/StringConstructor.java b/jdk/test/java/math/BigDecimal/StringConstructor.java
index df51b32574a..47ecf7085cc 100644
--- a/jdk/test/java/math/BigDecimal/StringConstructor.java
+++ b/jdk/test/java/math/BigDecimal/StringConstructor.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main StringConstructor
* @bug 4103117 4331084 4488017 4490929 6255285 6268365 8074460 8078672
* @summary Tests the BigDecimal string constructor (use -Dseed=X to set PRNG seed).
diff --git a/jdk/test/java/math/BigInteger/BigIntegerTest.java b/jdk/test/java/math/BigInteger/BigIntegerTest.java
index 06c2da5b06e..8d043c57649 100644
--- a/jdk/test/java/math/BigInteger/BigIntegerTest.java
+++ b/jdk/test/java/math/BigInteger/BigIntegerTest.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main BigIntegerTest
* @bug 4181191 4161971 4227146 4194389 4823171 4624738 4812225 4837946 4026465 8074460 8078672 8032027
* @summary tests methods in BigInteger (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/math/BigInteger/ModPow65537.java b/jdk/test/java/math/BigInteger/ModPow65537.java
index d8acf648548..230336b94f5 100644
--- a/jdk/test/java/math/BigInteger/ModPow65537.java
+++ b/jdk/test/java/math/BigInteger/ModPow65537.java
@@ -24,6 +24,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main ModPow65537
* @bug 4891312 8074460 8078672
* @summary verify that modPow() not broken by the special case for 65537 (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/math/BigInteger/PrimeTest.java b/jdk/test/java/math/BigInteger/PrimeTest.java
index bfac4c82dde..74b777239ca 100644
--- a/jdk/test/java/math/BigInteger/PrimeTest.java
+++ b/jdk/test/java/math/BigInteger/PrimeTest.java
@@ -26,6 +26,7 @@
/*
* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main PrimeTest
* @bug 8026236 8074460 8078672
* @summary test primality verification methods in BigInteger (use -Dseed=X to set PRNG seed)
diff --git a/jdk/test/java/net/Inet6Address/B6206527.java b/jdk/test/java/net/Inet6Address/B6206527.java
index 9ce617b3437..6189606be31 100644
--- a/jdk/test/java/net/Inet6Address/B6206527.java
+++ b/jdk/test/java/net/Inet6Address/B6206527.java
@@ -26,6 +26,8 @@
* @bug 6206527
* @summary "cannot assign address" when binding ServerSocket on Suse 9
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main B6206527
*/
diff --git a/jdk/test/java/net/Inet6Address/B6558853.java b/jdk/test/java/net/Inet6Address/B6558853.java
index 408c30de64a..bff36c56062 100644
--- a/jdk/test/java/net/Inet6Address/B6558853.java
+++ b/jdk/test/java/net/Inet6Address/B6558853.java
@@ -26,6 +26,8 @@
* @bug 6558853
* @summary getHostAddress() on connections using IPv6 link-local addrs should have zone id
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main B6558853
*/
diff --git a/jdk/test/java/net/InetAddress/CheckJNI.java b/jdk/test/java/net/InetAddress/CheckJNI.java
index 76ac633e921..54d2255166f 100644
--- a/jdk/test/java/net/InetAddress/CheckJNI.java
+++ b/jdk/test/java/net/InetAddress/CheckJNI.java
@@ -25,6 +25,8 @@
* @bug 4889870 4890033
* @summary java -Xcheck:jni failing in net code on Solaris / [Datagram]Socket.getLocalAddress() failure
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main/othervm -Xcheck:jni CheckJNI
*/
diff --git a/jdk/test/java/net/InetAddress/ptr/Lookup.java b/jdk/test/java/net/InetAddress/ptr/Lookup.java
index c3c5eebde78..d3051173297 100644
--- a/jdk/test/java/net/InetAddress/ptr/Lookup.java
+++ b/jdk/test/java/net/InetAddress/ptr/Lookup.java
@@ -28,8 +28,12 @@
* @summary Test that reverse lookups of IPv4 addresses work when IPv6
* is enabled
* @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- * jdk.test.lib.process.OutputAnalyzer
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* Lookup
* @run main Lookup root
*
diff --git a/jdk/test/java/net/MulticastSocket/JoinLeave.java b/jdk/test/java/net/MulticastSocket/JoinLeave.java
index 2e59a08444e..a4f914bb650 100644
--- a/jdk/test/java/net/MulticastSocket/JoinLeave.java
+++ b/jdk/test/java/net/MulticastSocket/JoinLeave.java
@@ -26,6 +26,8 @@
* @bug 4091811 4148753 4102731
* @summary Test java.net.MulticastSocket joinGroup and leaveGroup
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main JoinLeave
*/
diff --git a/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java b/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java
index 03bb39b48de..a23f26dddd7 100644
--- a/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java
+++ b/jdk/test/java/net/MulticastSocket/SetLoopbackMode.java
@@ -26,6 +26,8 @@
* @bug 4686717
* @summary Test MulticastSocket.setLoopbackMode
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main/othervm SetLoopbackMode
*/
diff --git a/jdk/test/java/net/NetworkConfigurationProbe.java b/jdk/test/java/net/NetworkConfigurationProbe.java
index 607671b8045..ed3763566bf 100644
--- a/jdk/test/java/net/NetworkConfigurationProbe.java
+++ b/jdk/test/java/net/NetworkConfigurationProbe.java
@@ -25,6 +25,13 @@
* @test
* @summary NOT A TEST. Captures the network interface configuration.
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main NetworkConfigurationProbe
*/
diff --git a/jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java b/jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java
index d2e3af48689..b62b6057366 100644
--- a/jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java
+++ b/jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java
@@ -30,8 +30,12 @@
* can cause fd leak
* @requires (os.family != "windows")
* @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- * jdk.test.lib.process.OutputAnalyzer
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* AcceptCauseFileDescriptorLeak
* @run main/othervm AcceptCauseFileDescriptorLeak root
*/
diff --git a/jdk/test/java/net/Socket/LinkLocal.java b/jdk/test/java/net/Socket/LinkLocal.java
index 9957c5c44f0..d048764e981 100644
--- a/jdk/test/java/net/Socket/LinkLocal.java
+++ b/jdk/test/java/net/Socket/LinkLocal.java
@@ -27,6 +27,8 @@
* @summary Connecting to a link-local IPv6 address should not
* causes a SocketException to be thrown.
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main LinkLocal
*/
diff --git a/jdk/test/java/net/Socket/OldSocketImplTestDriver.java b/jdk/test/java/net/Socket/OldSocketImplTestDriver.java
index 840579f3ab9..3bfb8967c42 100644
--- a/jdk/test/java/net/Socket/OldSocketImplTestDriver.java
+++ b/jdk/test/java/net/Socket/OldSocketImplTestDriver.java
@@ -30,7 +30,12 @@ import java.nio.file.Paths;
* @test
* @bug 6449565
* @library /test/lib
- * @build jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main OldSocketImplTestDriver
* @summary Test driver for OdlSocketImpl
*/
diff --git a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java
index 360fd2c8c62..c0c3260380a 100644
--- a/jdk/test/java/net/SocketPermission/SocketPermissionTest.java
+++ b/jdk/test/java/net/SocketPermission/SocketPermissionTest.java
@@ -26,6 +26,8 @@
* @bug 8047031
* @summary SocketPermission tests for legacy socket types
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run testng/othervm SocketPermissionTest
*/
diff --git a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java
index 78256ed9f09..3453f8a56a0 100644
--- a/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java
+++ b/jdk/test/java/net/URLClassLoader/closetest/CloseTest.java
@@ -30,7 +30,10 @@
* @library ../../../../com/sun/net/httpserver
* /lib/testlibrary
* /test/lib
- * @build FileServerHandler JarUtils jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
+ * FileServerHandler JarUtils
* @run main/othervm CloseTest
* @summary URL-downloaded jar files can consume all available file descriptors
*/
diff --git a/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java b/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java
index 30afec4be4d..896dd404b30 100644
--- a/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java
+++ b/jdk/test/java/net/URLClassLoader/closetest/GetResourceAsStream.java
@@ -26,7 +26,10 @@
* @bug 6899919
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler
- * @build JarUtils jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
+ * JarUtils
* @run main/othervm GetResourceAsStream
*/
diff --git a/jdk/test/java/net/URLClassLoader/getresourceasstream/TestDriver.java b/jdk/test/java/net/URLClassLoader/getresourceasstream/TestDriver.java
index 5daaee95407..526689e21ea 100644
--- a/jdk/test/java/net/URLClassLoader/getresourceasstream/TestDriver.java
+++ b/jdk/test/java/net/URLClassLoader/getresourceasstream/TestDriver.java
@@ -26,8 +26,12 @@
* @bug 5103449
* @summary REGRESSION: getResourceAsStream is broken in JDK1.5.0-rc
* @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- * jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* Test
* @run main/othervm TestDriver
*/
diff --git a/jdk/test/java/net/URLClassLoader/sealing/CheckSealedTest.java b/jdk/test/java/net/URLClassLoader/sealing/CheckSealedTest.java
index f0f70496281..b733b678871 100644
--- a/jdk/test/java/net/URLClassLoader/sealing/CheckSealedTest.java
+++ b/jdk/test/java/net/URLClassLoader/sealing/CheckSealedTest.java
@@ -26,8 +26,12 @@
* @bug 4244970
* @summary Test to see if sealing violation is detected correctly
* @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- * jdk.test.lib.process.OutputAnalyzer
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main CheckSealedTest
*/
diff --git a/jdk/test/java/net/URLConnection/6212146/TestDriver.java b/jdk/test/java/net/URLConnection/6212146/TestDriver.java
index 31bee6fefec..d6bffb198de 100644
--- a/jdk/test/java/net/URLConnection/6212146/TestDriver.java
+++ b/jdk/test/java/net/URLConnection/6212146/TestDriver.java
@@ -27,8 +27,12 @@
* @summary URLConnection.connect() fails on JAR Entry it creates
* file handler leak
* @library /test/lib
- * @build jdk.test.lib.JDKToolFinder
- * jdk.test.lib.process.ProcessTools
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* Test
* @run main/othervm TestDriver
*/
diff --git a/jdk/test/java/net/httpclient/RequestBodyTest.java b/jdk/test/java/net/httpclient/RequestBodyTest.java
index e60a06abc4f..9cb90a0fed4 100644
--- a/jdk/test/java/net/httpclient/RequestBodyTest.java
+++ b/jdk/test/java/net/httpclient/RequestBodyTest.java
@@ -29,6 +29,8 @@
* @library /lib/testlibrary/ /test/lib
* @compile ../../../com/sun/net/httpserver/LogFilter.java
* @compile ../../../com/sun/net/httpserver/FileServerHandler.java
+ * @build jdk.test.lib.Platform
+ * @build jdk.test.lib.util.FileUtils
* @build LightWeightHttpServer
* @build jdk.testlibrary.SimpleSSLContext
* @run testng/othervm RequestBodyTest
diff --git a/jdk/test/java/net/ipv6tests/B6521014.java b/jdk/test/java/net/ipv6tests/B6521014.java
index a622bb1a69d..6d5aa0b252a 100644
--- a/jdk/test/java/net/ipv6tests/B6521014.java
+++ b/jdk/test/java/net/ipv6tests/B6521014.java
@@ -26,6 +26,8 @@
* @bug 6521014 6543428
* @summary IOException thrown when Socket tries to bind to an local IPv6 address on SuSE Linux
* @library /test/lib
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
* @run main B6521014
*/
diff --git a/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java b/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java
index eff3d6a785e..d5da7fa6621 100644
--- a/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java
+++ b/jdk/test/java/net/spi/URLStreamHandlerProvider/Basic.java
@@ -56,7 +56,9 @@ import static java.util.Arrays.asList;
* @modules jdk.compiler
* @summary Basic test for URLStreamHandlerProvider
* @library /lib/testlibrary /test/lib
- * @build jdk.testlibrary.JDKToolFinder
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * jdk.testlibrary.JDKToolFinder
* @compile Basic.java Child.java
* @run main Basic
*/
diff --git a/jdk/test/java/nio/Buffer/LimitDirectMemoryNegativeTest.java b/jdk/test/java/nio/Buffer/LimitDirectMemoryNegativeTest.java
index 136839bd539..af157136715 100644
--- a/jdk/test/java/nio/Buffer/LimitDirectMemoryNegativeTest.java
+++ b/jdk/test/java/nio/Buffer/LimitDirectMemoryNegativeTest.java
@@ -28,6 +28,12 @@
* various bad values fail to launch the VM
* @requires (os.arch == "x86_64") | (os.arch == "amd64") | (os.arch == "sparcv9")
* @library /test/lib
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
*
* @run main LimitDirectMemoryNegativeTest foo
* @run main LimitDirectMemoryNegativeTest 10kmt
diff --git a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
index bc2b4fa81c1..0dc0318ab68 100644
--- a/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
+++ b/jdk/test/java/nio/channels/AsynchronousSocketChannel/Basic.java
@@ -25,6 +25,7 @@
* @bug 4607272 6842687 6878369 6944810 7023403
* @summary Unit test for AsynchronousSocketChannel(use -Dseed=X to set PRNG seed)
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main Basic -skipSlowConnectTest
* @key randomness intermittent
*/
diff --git a/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java b/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java
index 4ce1b41f701..cb2d2c0f15d 100644
--- a/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java
+++ b/jdk/test/java/nio/channels/DatagramChannel/BasicMulticastTests.java
@@ -25,7 +25,9 @@
* @bug 4527345
* @summary Unit test for DatagramChannel's multicast support
* @library /test/lib
- * @build BasicMulticastTests
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
+ * BasicMulticastTests
* @run main BasicMulticastTests
*/
diff --git a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
index 591e3945e98..7569d14f155 100644
--- a/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
+++ b/jdk/test/java/nio/channels/DatagramChannel/MulticastSendReceiveTests.java
@@ -25,7 +25,9 @@
* @bug 4527345 7026376 6633549
* @summary Unit test for DatagramChannel's multicast support
* @library /test/lib
- * @build MulticastSendReceiveTests
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
+ * MulticastSendReceiveTests
* @run main MulticastSendReceiveTests
* @run main/othervm -Djava.net.preferIPv4Stack=true MulticastSendReceiveTests
* @key randomness
diff --git a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java
index d79a641002c..0ee99f155ad 100644
--- a/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java
+++ b/jdk/test/java/nio/channels/DatagramChannel/Promiscuous.java
@@ -26,7 +26,9 @@
* @summary Test for interference when two sockets are bound to the same
* port but joined to different multicast groups
* @library /test/lib
- * @build Promiscuous
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
+ * Promiscuous
* @run main Promiscuous
* @run main/othervm -Djava.net.preferIPv4Stack=true Promiscuous
* @key randomness
diff --git a/jdk/test/java/nio/channels/FileChannel/Transfer.java b/jdk/test/java/nio/channels/FileChannel/Transfer.java
index a6566996b0c..9e2eeb49d72 100644
--- a/jdk/test/java/nio/channels/FileChannel/Transfer.java
+++ b/jdk/test/java/nio/channels/FileChannel/Transfer.java
@@ -26,6 +26,7 @@
* @summary Test FileChannel.transferFrom and transferTo (use -Dseed=X to set PRNG seed)
* @library ..
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run testng/timeout=300 Transfer
* @key randomness
*/
diff --git a/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java b/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java
index 34da13f3076..ef2c389ef39 100644
--- a/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java
+++ b/jdk/test/java/nio/channels/Selector/LotsOfUpdatesTest.java
@@ -28,7 +28,13 @@
* Solaris if maximum number of file descriptors is less than 10000
* @requires (os.family != "windows")
* @library /test/lib
- * @build LotsOfUpdates
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * LotsOfUpdates
* @run main LotsOfUpdatesTest
*/
diff --git a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java
index 11df48a71f1..4e5f17d27c8 100644
--- a/jdk/test/java/nio/channels/SocketChannel/VectorIO.java
+++ b/jdk/test/java/nio/channels/SocketChannel/VectorIO.java
@@ -24,6 +24,7 @@
/* @test
* @summary Test socketchannel vector IO (use -Dseed=X to set PRNG seed)
* @library .. /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main VectorIO
* @key randomness
*/
diff --git a/jdk/test/java/nio/file/FileStore/Basic.java b/jdk/test/java/nio/file/FileStore/Basic.java
index 16997de8495..bc33002b70c 100644
--- a/jdk/test/java/nio/file/FileStore/Basic.java
+++ b/jdk/test/java/nio/file/FileStore/Basic.java
@@ -26,6 +26,8 @@
* @summary Unit test for java.nio.file.FileStore
* @key intermittent
* @library .. /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run main Basic
*/
diff --git a/jdk/test/java/nio/file/FileSystem/Basic.java b/jdk/test/java/nio/file/FileSystem/Basic.java
index d0546896206..83f2acbe9ce 100644
--- a/jdk/test/java/nio/file/FileSystem/Basic.java
+++ b/jdk/test/java/nio/file/FileSystem/Basic.java
@@ -25,6 +25,8 @@
* @bug 4313887 6838333 8132497
* @summary Unit test for java.nio.file.FileSystem
* @library .. /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run main/othervm Basic
*/
diff --git a/jdk/test/java/nio/file/Files/CopyAndMove.java b/jdk/test/java/nio/file/Files/CopyAndMove.java
index f3094f2b357..ce9f681d4f7 100644
--- a/jdk/test/java/nio/file/Files/CopyAndMove.java
+++ b/jdk/test/java/nio/file/Files/CopyAndMove.java
@@ -25,7 +25,8 @@
* @bug 4313887 6838333 6917021 7006126 6950237 8006645
* @summary Unit test for java.nio.file.Files copy and move methods (use -Dseed=X to set PRNG seed)
* @library .. /test/lib
- * @build CopyAndMove PassThroughFileSystem
+ * @build jdk.test.lib.RandomFactory
+ * CopyAndMove PassThroughFileSystem
* @run main/othervm CopyAndMove
* @key randomness
*/
diff --git a/jdk/test/java/nio/file/Files/DeleteOnClose.java b/jdk/test/java/nio/file/Files/DeleteOnClose.java
index 3df075689aa..f5fab1c5be2 100644
--- a/jdk/test/java/nio/file/Files/DeleteOnClose.java
+++ b/jdk/test/java/nio/file/Files/DeleteOnClose.java
@@ -26,6 +26,13 @@
* @bug 4313887
* @summary Unit test for DELETE_ON_CLOSE open option
* @library /test/lib ..
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * @run main DeleteOnClose
*/
import java.io.IOException;
diff --git a/jdk/test/java/nio/file/Files/StreamLinesTest.java b/jdk/test/java/nio/file/Files/StreamLinesTest.java
index 8ffe8919a87..402b114ae0b 100644
--- a/jdk/test/java/nio/file/Files/StreamLinesTest.java
+++ b/jdk/test/java/nio/file/Files/StreamLinesTest.java
@@ -25,6 +25,7 @@
* @bug 8072773
* @library /test/lib /lib/testlibrary/bootlib
* @build java.base/java.util.stream.OpTestCase
+ * jdk.test.lib.RandomFactory
* @run testng/othervm StreamLinesTest
* @summary Tests streams returned from Files.lines, primarily focused on
* testing the file-channel-based stream stream with supported
diff --git a/jdk/test/java/nio/file/Files/walkFileTree/FindTest.java b/jdk/test/java/nio/file/Files/walkFileTree/FindTest.java
new file mode 100644
index 00000000000..9fb16a7b14c
--- /dev/null
+++ b/jdk/test/java/nio/file/Files/walkFileTree/FindTest.java
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2012, 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 4313887 6907737
+ * @summary Tests that walkFileTree is consistent with the native find program
+ * @requires (os.family != "windows")
+ * @library /test/lib
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * CreateFileTree
+ * @run testng/othervm -Djava.io.tmpdir=. FindTest
+ */
+
+import java.io.IOException;
+import java.nio.file.FileSystemLoopException;
+import java.nio.file.FileVisitOption;
+import java.nio.file.FileVisitResult;
+import java.nio.file.FileVisitor;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Random;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+public class FindTest {
+
+ private static final Random rand = new Random();
+ private static final boolean isAIX = System.getProperty("os.name").equals("AIX");
+ private static Path top;
+ private static String TOP;
+
+ @BeforeClass
+ public static void createFileTree() throws Exception {
+ top = CreateFileTree.create();
+ TOP = top.toAbsolutePath().toString();
+ }
+
+ @Test
+ public void printTreeTest() throws Throwable {
+ // print the file tree and compare output with find(1)
+ assertOutputEquals(printFileTree(top), runFind("find", TOP));
+ }
+
+ @Test
+ public void printTreeFollowLinkTest() throws Throwable {
+ // print the file tree, following links, and compare output with find(1).
+
+ // On AIX "find -follow" may core dump on recursive links without '-L'
+ // see: http://www-01.ibm.com/support/docview.wss?uid=isg1IV28143
+ String[] cmds = isAIX
+ ? new String[]{"find", "-L", TOP, "-follow"}
+ : new String[]{"find", TOP, "-follow"};
+ OutputAnalyzer expected = runFind(cmds);
+
+ // Some versions of find(1) output cycles (sym links to ancestor
+ // directories), other versions do not. For that reason we run
+ // PrintFileTree with the -printCycles option when the output without
+ // this option differs to find(1).
+ try {
+ assertOutputEquals(printFileTree(top, "-follow"), expected);
+ } catch (AssertionError x) {
+ assertOutputEquals(printFileTree(top, "-follow", "-printCycles"), expected);
+ }
+ }
+
+ private void assertOutputEquals(List actual, OutputAnalyzer expected)
+ throws IOException {
+ List expectedList = Arrays.asList(expected.getStdout()
+ .split(System.lineSeparator()));
+ assertEquals(actual.size(), expectedList.size());
+ assertTrue(actual.removeAll(expectedList));
+ }
+
+ private OutputAnalyzer runFind(String... cmds) throws Throwable {
+ return ProcessTools.executeCommand(cmds);
+ }
+
+ /**
+ * Invokes Files.walkFileTree to traverse a file tree and prints
+ * each of the directories and files. The -follow option causes symbolic
+ * links to be followed and the -printCycles option will print links
+ * where the target of the link is an ancestor directory.
+ */
+ private static List printFileTree(Path dir, String... opts) throws Exception {
+ List fileTreeList = new ArrayList<>();
+
+ List optsList = Arrays.asList(opts);
+ boolean followLinks = optsList.contains("-follow");
+ boolean reportCycles = optsList.contains("-printCycles");
+
+ Set options = new HashSet<>();
+ if (followLinks)
+ options.add(FileVisitOption.FOLLOW_LINKS);
+
+ Files.walkFileTree(dir, options, Integer.MAX_VALUE, new FileVisitor() {
+ @Override
+ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
+ fileTreeList.add(dir);
+ return FileVisitResult.CONTINUE;
+ }
+ @Override
+ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
+ fileTreeList.add(file);
+ return FileVisitResult.CONTINUE;
+ }
+ @Override
+ public FileVisitResult postVisitDirectory(Path dir, IOException exc)
+ throws IOException
+ {
+ if (exc != null)
+ throw exc;
+ return FileVisitResult.CONTINUE;
+ }
+ @Override
+ public FileVisitResult visitFileFailed(Path file, IOException exc)
+ throws IOException
+ {
+ if (followLinks && (exc instanceof FileSystemLoopException)) {
+ if (reportCycles)
+ fileTreeList.add(file);
+ return FileVisitResult.CONTINUE;
+ } else {
+ throw exc;
+ }
+ }
+ });
+
+ return fileTreeList.stream()
+ .map(f -> f.toAbsolutePath().toString())
+ .collect(Collectors.toCollection(ArrayList::new));
+ }
+}
diff --git a/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java b/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java
deleted file mode 100644
index 11fec7cd6a0..00000000000
--- a/jdk/test/java/nio/file/Files/walkFileTree/PrintFileTree.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2008, 2011, 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.
- */
-
-import java.nio.file.*;
-import java.nio.file.attribute.*;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * Invokes Files.walkFileTree to traverse a file tree and prints
- * each of the directories and files. The -follow option causes symbolic
- * links to be followed and the -printCycles option will print links
- * where the target of the link is an ancestor directory.
- */
-
-public class PrintFileTree {
-
- public static void main(String[] args) throws Exception {
- boolean followLinks = false;
- boolean printCycles = false;
- int i = 0;
- while (i < (args.length-1)) {
- switch (args[i]) {
- case "-follow" : followLinks = true; break;
- case "-printCycles" : printCycles = true; break;
- default:
- throw new RuntimeException(args[i] + " not recognized");
- }
- i++;
- }
- Path dir = Paths.get(args[i]);
-
- Set options = new HashSet();
- if (followLinks)
- options.add(FileVisitOption.FOLLOW_LINKS);
-
- final boolean follow = followLinks;
- final boolean reportCycles = printCycles;
- Files.walkFileTree(dir, options, Integer.MAX_VALUE, new FileVisitor() {
- @Override
- public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
- System.out.println(dir);
- return FileVisitResult.CONTINUE;
- }
- @Override
- public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
- System.out.println(file);
- return FileVisitResult.CONTINUE;
- }
- @Override
- public FileVisitResult postVisitDirectory(Path dir, IOException exc)
- throws IOException
- {
- if (exc != null)
- throw exc;
- return FileVisitResult.CONTINUE;
- }
- @Override
- public FileVisitResult visitFileFailed(Path file, IOException exc)
- throws IOException
- {
- if (follow && (exc instanceof FileSystemLoopException)) {
- if (reportCycles)
- System.out.println(file);
- return FileVisitResult.CONTINUE;
- } else {
- throw exc;
- }
- }
- });
- }
-}
diff --git a/jdk/test/java/nio/file/Files/walkFileTree/find.sh b/jdk/test/java/nio/file/Files/walkFileTree/find.sh
deleted file mode 100644
index 1bf7621226b..00000000000
--- a/jdk/test/java/nio/file/Files/walkFileTree/find.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-# Copyright (c) 2008, 2013, 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 4313887 6907737
-# @summary Tests that walkFileTree is consistent with the native find program
-# @build CreateFileTree PrintFileTree
-# @run shell find.sh
-
-# if TESTJAVA isn't set then we assume an interactive run.
-
-if [ -z "$TESTJAVA" ]; then
- TESTSRC=.
- TESTCLASSES=.
- JAVA=java
-else
- JAVA="${TESTJAVA}/bin/java"
-fi
-
-OS=`uname -s`
-case "$OS" in
- Windows_* | CYGWIN* )
- echo "This test does not run on Windows"
- exit 0
- ;;
- AIX )
- CLASSPATH=${TESTCLASSES}:${TESTSRC}
- # On AIX "find -follow" may core dump on recursive links without '-L'
- # see: http://www-01.ibm.com/support/docview.wss?uid=isg1IV28143
- FIND_FOLLOW_OPT="-L"
- ;;
- * )
- FIND_FOLLOW_OPT=
- CLASSPATH=${TESTCLASSES}:${TESTSRC}
- ;;
-esac
-export CLASSPATH
-
-# create the file tree
-ROOT=`$JAVA CreateFileTree`
-if [ $? != 0 ]; then exit 1; fi
-
-failures=0
-
-# print the file tree and compare output with find(1)
-$JAVA ${TESTVMOPTS} PrintFileTree "$ROOT" > out1
-find "$ROOT" > out2
-diff out1 out2
-if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-
-# repeat test following links. Some versions of find(1) output
-# cycles (sym links to ancestor directories), other versions do
-# not. For that reason we run PrintFileTree with the -printCycles
-# option when the output without this option differs to find(1).
-find $FIND_FOLLOW_OPT "$ROOT" -follow > out1
-$JAVA ${TESTVMOPTS} PrintFileTree -follow "$ROOT" > out2
-diff out1 out2
-if [ $? != 0 ];
- then
- # re-run printing cycles to stdout
- $JAVA ${TESTVMOPTS} PrintFileTree -follow -printCycles "$ROOT" > out2
- diff out1 out2
- if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
- fi
-
-# clean-up
-rm -r "$ROOT"
-
-echo ''
-if [ $failures -gt 0 ];
- then echo "$failures test(s) failed";
- else echo "Test passed"; fi
-exit $failures
diff --git a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java
index 04a96c09fda..d882adae4db 100644
--- a/jdk/test/java/nio/file/WatchService/LotsOfEvents.java
+++ b/jdk/test/java/nio/file/WatchService/LotsOfEvents.java
@@ -26,6 +26,7 @@
* @summary Tests WatchService behavior when lots of events are pending (use -Dseed=X to set PRNG seed)
* @library ..
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main/timeout=180 LotsOfEvents
* @key randomness
*/
diff --git a/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java b/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java
index e29e24aea8a..2d5562fed61 100644
--- a/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java
+++ b/jdk/test/java/rmi/registry/serialFilter/RegistryFilterTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -21,24 +21,18 @@
* questions.
*/
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
-import java.io.ObjectOutputStream;
import java.io.Serializable;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
+import java.rmi.AlreadyBoundException;
import java.rmi.MarshalledObject;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
-import java.rmi.AlreadyBoundException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
-import java.util.Objects;
import java.security.Security;
+import java.util.Objects;
import org.testng.Assert;
import org.testng.TestNG;
@@ -57,7 +51,8 @@ import org.testng.annotations.Test;
* @summary Test filters for the RMI Registry
* @run testng/othervm RegistryFilterTest
* @run testng/othervm
- * -Dsun.rmi.registry.registryFilter=!java.lang.Long;!RegistryFilterTest$RejectableClass
+ * -Dsun.rmi.registry.registryFilter=!java.lang.Long;!RegistryFilterTest$RejectableClass;maxdepth=19
+ * -Dtest.maxdepth=19
* RegistryFilterTest
* @run testng/othervm/policy=security.policy
* -Djava.security.properties=${test.src}/java.security-extra1
@@ -68,6 +63,8 @@ public class RegistryFilterTest {
private static int port;
private static Registry registry;
+ static final int REGISTRY_MAX_DEPTH = 20;
+
static final int REGISTRY_MAX_ARRAY = 10000;
static final String registryFilter =
@@ -125,7 +122,7 @@ public class RegistryFilterTest {
/*
- * Test registry rejects an object with the max array size + 1.
+ * Test registry rejects an object with the max array size + 1.
*/
@Test(dataProvider="bindData")
public void simpleBind(String name, Remote obj, boolean blacklisted) throws RemoteException, AlreadyBoundException, NotBoundException {
@@ -139,9 +136,9 @@ public class RegistryFilterTest {
}
/*
- * Test registry rejects an object with a well known class
- * if blacklisted in the security properties.
- */
+ * Test registry rejects an object with a well known class
+ * if blacklisted in the security properties.
+ */
@Test
public void simpleRejectableClass() throws RemoteException, AlreadyBoundException, NotBoundException {
RejectableClass r1 = null;
@@ -150,9 +147,46 @@ public class RegistryFilterTest {
r1 = new RejectableClass();
registry.bind(name, r1);
registry.unbind(name);
- Assert.assertNull(registryFilter, "Registry filter should not have rejected");
+ Assert.assertNull(registryFilter, "Registry filter should have rejected");
} catch (Exception rex) {
- Assert.assertNotNull(registryFilter, "Registry filter should have rejected");
+ Assert.assertNotNull(registryFilter, "Registry filter should not have rejected");
+ }
+ }
+
+ /*
+ * Test registry does not reject an object with depth at the built-in limit.
+ */
+ @Test
+ public void simpleDepthBuiltinNonRejectable() throws RemoteException, AlreadyBoundException, NotBoundException {
+ int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH);
+ depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH);
+ System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter);
+ try {
+ String name = "reject2";
+ DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride);
+ registry.bind(name, r1);
+ registry.unbind(name);
+ } catch (Exception rex) {
+ Assert.fail("Registry filter should not have rejected depth: "
+ + depthOverride);
+ }
+ }
+
+ /*
+ * Test registry rejects an object with depth at the limit + 1.
+ */
+ @Test
+ public void simpleDepthRejectable() throws RemoteException, AlreadyBoundException, NotBoundException {
+ int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH);
+ depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH);
+ System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter);
+ try {
+ String name = "reject3";
+ DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride + 1);
+ registry.bind(name, r1);
+ Assert.fail("Registry filter should have rejected depth: " + depthOverride + 1);
+ } catch (Exception rex) {
+ // Rejection expected
}
}
@@ -173,6 +207,7 @@ public class RegistryFilterTest {
return super.toString() + "//" + Objects.toString(obj);
}
}
+
/**
* A simple Serializable Remote object that is passed by value.
* It and its contents are checked by the Registry serial filter.
@@ -183,4 +218,25 @@ public class RegistryFilterTest {
RejectableClass() {}
}
+ /**
+ * A simple Serializable Remote object that is passed by value.
+ * It and its contents are checked by the Registry serial filter.
+ */
+ static class DepthRejectableClass implements Serializable, Remote {
+ private static final long serialVersionUID = 362498820763181264L;
+ private final DepthRejectableClass next;
+
+ private DepthRejectableClass(DepthRejectableClass next) {
+ this.next = next;
+ }
+
+ static DepthRejectableClass create(int depth) {
+ DepthRejectableClass next = new DepthRejectableClass(null);
+ for (int i = 1; i < depth; i++) {
+ next = new DepthRejectableClass(next);
+ }
+ return next;
+ }
+ }
+
}
diff --git a/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java b/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java
index be8b719bb33..711c3030dde 100644
--- a/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java
+++ b/jdk/test/java/security/AccessController/DoPrivAccompliceTest.java
@@ -42,7 +42,13 @@ import java.nio.file.Paths;
* DoPrivAccmplice.jar.
*
* @library /test/lib
- *
+ * @build jdk.test.lib.util.JarUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main/othervm DoPrivAccompliceTest
*/
diff --git a/jdk/test/java/security/KeyStore/PKCS12/EntryProtectionTest.java b/jdk/test/java/security/KeyStore/PKCS12/EntryProtectionTest.java
index 225ffa3a6eb..5395a72fba5 100644
--- a/jdk/test/java/security/KeyStore/PKCS12/EntryProtectionTest.java
+++ b/jdk/test/java/security/KeyStore/PKCS12/EntryProtectionTest.java
@@ -42,6 +42,8 @@ import java.util.Arrays;
* specified by different PBE algorithms (use -Dseed=X to set PRNG seed)
* @library /test/lib /lib/testlibrary ../
* @key randomness
+ * @build jdk.test.lib.RandomFactory
+ * @run main EntryProtectionTest
*/
public class EntryProtectionTest {
private static final char[] PASSWORD = "passwd".toCharArray();
diff --git a/jdk/test/java/security/MessageDigest/TestDigestIOStream.java b/jdk/test/java/security/MessageDigest/TestDigestIOStream.java
index 623ee0f9c8b..13399500893 100644
--- a/jdk/test/java/security/MessageDigest/TestDigestIOStream.java
+++ b/jdk/test/java/security/MessageDigest/TestDigestIOStream.java
@@ -41,6 +41,7 @@ import static java.lang.System.out;
* @author Kevin Liu
* @key randomness
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main/timeout=180 TestDigestIOStream
*/
diff --git a/jdk/test/java/security/MessageDigest/TestSameLength.java b/jdk/test/java/security/MessageDigest/TestSameLength.java
index 4d614b1e387..3a41776b16f 100644
--- a/jdk/test/java/security/MessageDigest/TestSameLength.java
+++ b/jdk/test/java/security/MessageDigest/TestSameLength.java
@@ -36,6 +36,8 @@ import jdk.test.lib.RandomFactory;
* @author Kevin Liu
* @key randomness
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run main TestSameLength
*/
public class TestSameLength {
diff --git a/jdk/test/java/security/MessageDigest/TestSameValue.java b/jdk/test/java/security/MessageDigest/TestSameValue.java
index dbf109e46f5..b8b69ed722e 100644
--- a/jdk/test/java/security/MessageDigest/TestSameValue.java
+++ b/jdk/test/java/security/MessageDigest/TestSameValue.java
@@ -37,6 +37,8 @@ import jdk.test.lib.RandomFactory;
* @author Kevin Liu
* @key randomness
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
+ * @run main TestSameValue
*/
public class TestSameValue {
diff --git a/jdk/test/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java b/jdk/test/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java
index f6701e995d8..c851f6d5c3f 100644
--- a/jdk/test/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java
+++ b/jdk/test/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java
@@ -34,6 +34,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8050402
* @summary Check policy is extensible with user defined permissions
* @library /lib/testlibrary /test/lib
+ * @build jdk.test.lib.util.JarUtils
* @compile TVJar/TVPermission.java
* @run main ExtensiblePolicyWithJarTest
*/
diff --git a/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java b/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java
index f633576f4f0..3017262415a 100644
--- a/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java
+++ b/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java
@@ -25,6 +25,8 @@
* @bug 8051408 8158534
* @summary Make sure DrbgParameters coded as specified
* @library /test/lib
+ * @build jdk.test.lib.Asserts
+ * @run main DrbgParametersSpec
*/
import jdk.test.lib.Asserts;
diff --git a/jdk/test/java/security/Signature/Offsets.java b/jdk/test/java/security/Signature/Offsets.java
index 35a9b569acf..a21a7b313e8 100644
--- a/jdk/test/java/security/Signature/Offsets.java
+++ b/jdk/test/java/security/Signature/Offsets.java
@@ -42,6 +42,7 @@ import jdk.test.lib.RandomFactory;
* generation, the test tries to verify signature with the above API
* and passing in different signature offset (0, 33, 66, 99).
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main Offsets SUN NONEwithDSA
* @run main Offsets SUN SHA1withDSA
* @run main Offsets SUN SHA224withDSA
diff --git a/jdk/test/java/util/Arrays/ParallelPrefix.java b/jdk/test/java/util/Arrays/largeMemory/ParallelPrefix.java
similarity index 86%
rename from jdk/test/java/util/Arrays/ParallelPrefix.java
rename to jdk/test/java/util/Arrays/largeMemory/ParallelPrefix.java
index 7772c6e4c75..9c102fe5f34 100644
--- a/jdk/test/java/util/Arrays/ParallelPrefix.java
+++ b/jdk/test/java/util/Arrays/largeMemory/ParallelPrefix.java
@@ -25,9 +25,11 @@
* @test 8014076 8025067
* @summary unit test for Arrays.ParallelPrefix().
* @author Tristan Yan
- * @run testng ParallelPrefix
+ * @modules java.management jdk.management
+ * @run testng/othervm -Xms256m -Xmx1024m ParallelPrefix
*/
+import java.lang.management.ManagementFactory;
import java.util.Arrays;
import java.util.function.BinaryOperator;
import java.util.function.DoubleBinaryOperator;
@@ -36,9 +38,11 @@ import java.util.function.IntBinaryOperator;
import java.util.function.LongBinaryOperator;
import java.util.stream.IntStream;
import java.util.stream.LongStream;
+import com.sun.management.OperatingSystemMXBean;
import static org.testng.Assert.*;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import org.testng.annotations.BeforeSuite;
public class ParallelPrefix {
//Array size less than MIN_PARTITION
@@ -53,12 +57,37 @@ public class ParallelPrefix {
//Array size much greater than MIN_PARTITION
private static final int LARGE_ARRAY_SIZE = 1 << 14;
- private static final int[] ARRAY_SIZE_COLLECTION = new int[]{
- SMALL_ARRAY_SIZE,
- THRESHOLD_ARRAY_SIZE,
- MEDIUM_ARRAY_SIZE,
- LARGE_ARRAY_SIZE
- };
+ private static int[] arraySizeCollection;
+
+ @BeforeSuite
+ public static void setup() {
+ java.lang.management.OperatingSystemMXBean bean =
+ ManagementFactory.getOperatingSystemMXBean();
+ if (bean instanceof OperatingSystemMXBean) {
+ OperatingSystemMXBean os = (OperatingSystemMXBean)bean;
+ long physicalMemorySize = os.getTotalPhysicalMemorySize() / (1024 * 1024);
+ System.out.println("System memory size: " + physicalMemorySize + "M");
+ // when we can get system memory size, and it's larger than 2G,
+ // then we enable large array size test below,
+ // else disable large array size test below.
+ if (physicalMemorySize > (2 * 1024)) {
+ arraySizeCollection = new int[]{
+ SMALL_ARRAY_SIZE,
+ THRESHOLD_ARRAY_SIZE,
+ MEDIUM_ARRAY_SIZE,
+ LARGE_ARRAY_SIZE
+ };
+ System.out.println("System memory is large enough, add large array size test");
+ return;
+ }
+ }
+ arraySizeCollection = new int[]{
+ SMALL_ARRAY_SIZE,
+ THRESHOLD_ARRAY_SIZE,
+ MEDIUM_ARRAY_SIZE
+ };
+ System.out.println("System memory is not large enough, remove large array size test");
+ }
@DataProvider(name = "intSet")
public static Object[][] intSet(){
@@ -96,10 +125,10 @@ public class ParallelPrefix {
private static Object[][] genericData(Function generateFunc, OPS[] ops) {
//test arrays which size is equals n-1, n, n+1, test random data
- Object[][] data = new Object[ARRAY_SIZE_COLLECTION.length * 3 * ops.length][4];
- for(int n = 0; n < ARRAY_SIZE_COLLECTION.length; n++ ) {
+ Object[][] data = new Object[arraySizeCollection.length * 3 * ops.length][4];
+ for(int n = 0; n < arraySizeCollection.length; n++ ) {
for(int testValue = -1 ; testValue <= 1; testValue++) {
- int array_size = ARRAY_SIZE_COLLECTION[n] + testValue;
+ int array_size = arraySizeCollection[n] + testValue;
for(int opsN = 0; opsN < ops.length; opsN++) {
int index = n * 3 * ops.length + (testValue + 1) * ops.length + opsN;
data[index][0] = generateFunc.apply(array_size);
diff --git a/jdk/test/java/util/Base64/TestBase64.java b/jdk/test/java/util/Base64/TestBase64.java
index b557965080e..0874e7fb40b 100644
--- a/jdk/test/java/util/Base64/TestBase64.java
+++ b/jdk/test/java/util/Base64/TestBase64.java
@@ -26,6 +26,7 @@
* 8014217 8025003 8026330 8028397 8129544 8165243
* @summary tests java.util.Base64
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main TestBase64
* @key randomness
*/
diff --git a/jdk/test/java/util/List/SubList.java b/jdk/test/java/util/List/SubList.java
index 29610fa33f5..0b2d02e4fe6 100644
--- a/jdk/test/java/util/List/SubList.java
+++ b/jdk/test/java/util/List/SubList.java
@@ -25,6 +25,7 @@
* @test
* @bug 8079136
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run testng SubList
* @summary Basic functionality of sublists
* @key randomness
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java
index eb14465c841..9bfa56c51ab 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.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,7 +28,7 @@ import java.util.ResourceBundle;
import java.util.Set;
import java.util.spi.AbstractResourceBundleProvider;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesAsia extends AbstractResourceBundleProvider
implements MyResourcesProvider
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java
index 0b821d5c042..b518406bf89 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/asiabundles/module-info.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
@@ -24,6 +24,6 @@
module asiabundles {
requires test;
- provides jdk.test.resources.MyResourcesProvider
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.asia.MyResourcesAsia;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java
index b16d4126342..177c7c6fded 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.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,7 +28,7 @@ import java.util.ResourceBundle;
import java.util.Set;
import java.util.spi.AbstractResourceBundleProvider;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesEU extends AbstractResourceBundleProvider
implements MyResourcesProvider
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java
index 67a55c88cfa..242595e46df 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/eubundles/module-info.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
@@ -24,6 +24,6 @@
module eubundles {
requires test;
- provides jdk.test.resources.MyResourcesProvider
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.eu.MyResourcesEU;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java
index eef21d29416..b5198c41e3c 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProviderImpl.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
@@ -26,6 +26,7 @@ package jdk.test.resources;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.spi.AbstractResourceBundleProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesProviderImpl extends AbstractResourceBundleProvider
implements MyResourcesProvider
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.java
similarity index 90%
rename from jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.java
index eacdd25ee73..32045008616 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources;
+package jdk.test.resources.spi;
import java.util.spi.ResourceBundleProvider;
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java
index 3ca685b7fd5..c9686ab8365 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic/src/test/module-info.java
@@ -22,7 +22,7 @@
*/
module test {
- exports jdk.test.resources to eubundles, asiabundles;
- uses jdk.test.resources.MyResourcesProvider;
- provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
+ exports jdk.test.resources.spi to eubundles, asiabundles;
+ uses jdk.test.resources.spi.MyResourcesProvider;
+ provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java
index 72d1010156b..f0c819e6db0 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.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
@@ -24,7 +24,7 @@
package jdk.test.resources.asia;
import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesAsia extends MyResourcesProvider {
public MyResourcesAsia() {
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java
index 0b821d5c042..b518406bf89 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/asiabundles/module-info.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
@@ -24,6 +24,6 @@
module asiabundles {
requires test;
- provides jdk.test.resources.MyResourcesProvider
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.asia.MyResourcesAsia;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java
index f95a44f9a36..12fb957b317 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/jdk/test/resources/eu/MyResourcesEU.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
@@ -24,7 +24,7 @@
package jdk.test.resources.eu;
import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesEU extends MyResourcesProvider {
public MyResourcesEU() {
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java
index 67a55c88cfa..242595e46df 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/eubundles/module-info.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
@@ -24,6 +24,6 @@
module eubundles {
requires test;
- provides jdk.test.resources.MyResourcesProvider
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.eu.MyResourcesEU;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java
index ef9c683397f..78fd0c06e36 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProviderImpl.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
@@ -24,6 +24,7 @@
package jdk.test.resources;
import java.util.Locale;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesProviderImpl extends MyResourcesProvider {
public MyResourcesProviderImpl() {
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.java
similarity index 93%
rename from jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.java
index 2ff0ceb18d7..124bc498f79 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources;
+package jdk.test.resources.spi;
import java.util.Locale;
diff --git a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java
index 3ca685b7fd5..2f68a75dc6f 100644
--- a/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/appbasic2/src/test/module-info.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
@@ -22,7 +22,7 @@
*/
module test {
- exports jdk.test.resources to eubundles, asiabundles;
- uses jdk.test.resources.MyResourcesProvider;
- provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
+ exports jdk.test.resources.spi to eubundles, asiabundles;
+ uses jdk.test.resources.spi.MyResourcesProvider;
+ provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.MyResourcesProviderImpl;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java
index a62c8beb4ae..f14ace513e6 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/jdk/test/resources/asia/MyResourcesAsia.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
@@ -24,7 +24,7 @@
package jdk.test.resources.asia;
import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
/**
*
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java
index 9c51bcca58d..045de7d8f0b 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/asiabundles/module-info.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
@@ -24,6 +24,6 @@
module asiabundles {
requires mainbundles;
- provides jdk.test.resources.MyResourcesProvider
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.asia.MyResourcesAsia;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java
index 689512002e0..6a5048aa81a 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/jdk/test/resources/eu/MyResourcesEU.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
@@ -24,7 +24,7 @@
package jdk.test.resources.eu;
import java.util.Locale;
-import jdk.test.resources.MyResourcesProvider;
+import jdk.test.resources.spi.MyResourcesProvider;
/**
*
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java
index 4a003a57fc9..b76e0b4c7a6 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/eubundles/module-info.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
@@ -24,6 +24,6 @@
module eubundles {
requires mainbundles;
- provides jdk.test.resources.MyResourcesProvider
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.eu.MyResourcesEU;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java
index ccb353cfe19..0809b790459 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesMain.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
@@ -24,6 +24,7 @@
package jdk.test.resources;
import java.util.Locale;
+import jdk.test.resources.spi.MyResourcesProvider;
public class MyResourcesMain extends MyResourcesProvider {
public MyResourcesMain() {
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.java
similarity index 95%
rename from jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.java
index 3cbbe563368..c6cb2dcc9db 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/jdk/test/resources/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources;
+package jdk.test.resources.spi;
import java.util.Arrays;
import java.util.Collections;
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java
index 64769aff1e7..d7e2db31709 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/mainbundles/module-info.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
@@ -22,7 +22,7 @@
*/
module mainbundles {
- exports jdk.test.resources to test, eubundles, asiabundles;
- provides jdk.test.resources.MyResourcesProvider
+ exports jdk.test.resources.spi to test, eubundles, asiabundles;
+ provides jdk.test.resources.spi.MyResourcesProvider
with jdk.test.resources.MyResourcesMain;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java
index 2d9e6e2990c..08d1dccdcec 100644
--- a/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/basic/src/test/module-info.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
@@ -23,5 +23,5 @@
module test {
requires mainbundles;
- uses jdk.test.resources.MyResourcesProvider;
+ uses jdk.test.resources.spi.MyResourcesProvider;
}
diff --git a/jdk/test/sun/net/www/protocol/jrt/other_resources.sh b/jdk/test/java/util/ResourceBundle/modules/layer/run.sh
similarity index 65%
rename from jdk/test/sun/net/www/protocol/jrt/other_resources.sh
rename to jdk/test/java/util/ResourceBundle/modules/layer/run.sh
index 79903759092..556f114a9c0 100644
--- a/jdk/test/sun/net/www/protocol/jrt/other_resources.sh
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/run.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -22,11 +22,9 @@
#
# @test
-# @build OtherResources
-# @run shell other_resources.sh
-# @summary Access a jrt:/ resource in an observable module that is not in
-# the boot layer and hence not known to the built-in class loaders. This
-# test is a shell test because the run tag doesn't support --limit-modules.
+# @bug 8180375
+# @summary Tests resource bundles are correctly loaded from
+# modules through ".spi.Provider" types.
set -e
@@ -38,8 +36,17 @@ if [ -z "$TESTJAVA" ]; then
TESTCLASSES="`pwd`"
fi
-JAVA="$TESTJAVA/bin/java ${TESTVMOPTS}"
-$JAVA --limit-modules java.base -cp $TESTCLASSES OtherResources
+JAVAC="$COMPILEJAVA/bin/javac"
+JAVA="$TESTJAVA/bin/java"
-exit 0
+rm -rf mods
+$JAVAC --module-source-path $TESTSRC/src -d mods --module m1,m2
+mkdir -p mods/m1/p/resources mods/m2/p/resources
+cp $TESTSRC/src/m1/p/resources/*.properties mods/m1/p/resources
+cp $TESTSRC/src/m2/p/resources/*.properties mods/m2/p/resources
+
+mkdir classes
+$JAVAC -d classes $TESTSRC/src/Main.java
+
+$JAVA -cp classes Main
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java
new file mode 100644
index 00000000000..a0fb8c15305
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/Main.java
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+import java.lang.module.Configuration;
+import java.lang.module.ModuleFinder;
+import java.lang.reflect.Method;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class Main {
+ public static void main(String... args) throws Exception {
+ ModuleFinder afterFinder = ModuleFinder.of(Paths.get("mods"));
+
+ Configuration cf = ModuleLayer.boot().configuration()
+ .resolveAndBind(ModuleFinder.of(), afterFinder,
+ List.of("m1", "m2"));
+
+ System.out.println("Configuration: " + cf);
+
+ ModuleLayer l = ModuleLayer.defineModulesWithManyLoaders(cf,
+ List.of(ModuleLayer.boot()),
+ ClassLoader.getPlatformClassLoader())
+ .layer();
+
+ Module m1 = l.findModule("m1").get();
+ ResourceBundle bundle =
+ ResourceBundle.getBundle("p.resources.MyResource",
+ Locale.US, m1);
+ ResourceBundle jabundle =
+ ResourceBundle.getBundle("p.resources.MyResource",
+ Locale.JAPANESE, m1);
+
+ String enResult = bundle.getString("key");
+ String jaResult = jabundle.getString("key");
+ if (!"hi".equals(enResult) || !"ja".equals(jaResult)) {
+ throw new RuntimeException("Unexpected resources loaded: en: " +
+ enResult + ", ja: " + jaResult);
+ }
+
+ Class> c = Class.forName(m1, "p.Main");
+ Method m = c.getDeclaredMethod("run");
+ m.invoke(null);
+ }
+}
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java
new file mode 100644
index 00000000000..de3da2e3b3a
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/module-info.java
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+module m1 {
+ exports p;
+ exports p.resources.spi;
+ uses p.resources.spi.MyResourceProvider;
+ provides p.resources.spi.MyResourceProvider with p.internal.BundleProvider;
+}
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java
new file mode 100644
index 00000000000..97e4ef17b22
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+package p;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.io.InputStream;
+
+public class Main {
+ public static void main(String... args) {
+ run();
+ }
+
+ public static void run() {
+ ClassLoader loader =
+ Main.class.getModule().getLayer().findLoader("m1");
+ ClassLoader loader2 =
+ Main.class.getModule().getLayer().findLoader("m2");
+
+ ResourceBundle bundle =
+ ResourceBundle.getBundle("p.resources.MyResource", Locale.US);
+ ResourceBundle bundle1 =
+ ResourceBundle.getBundle("p.resources.MyResource", Locale.JAPANESE);
+
+ String enResult = bundle.getString("key");
+ String jaResult = bundle1.getString("key");
+ if (!"hi".equals(enResult) || !"ja".equals(jaResult)) {
+ throw new RuntimeException("Unexpected resources loaded: en: " +
+ enResult + ", ja: " + jaResult);
+ }
+ }
+}
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java
new file mode 100644
index 00000000000..2d9b80261b3
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/internal/BundleProvider.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package p.internal;
+
+import p.resources.spi.MyResourceProvider;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UncheckedIOException;
+import java.util.Locale;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class BundleProvider extends AbstractResourceBundleProvider
+ implements MyResourceProvider {
+ public BundleProvider() {
+ super();
+ }
+ @Override
+ public ResourceBundle getBundle(String baseName, Locale locale) {
+ if (locale.equals(Locale.ENGLISH) || locale.equals(Locale.ROOT)) {
+ return super.getBundle(baseName, locale);
+ }
+
+ return null;
+ }
+
+}
diff --git a/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.sh b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties
similarity index 62%
rename from jdk/test/sun/net/www/protocol/file/DirPermissionDenied.sh
rename to jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties
index 1bceecfe7ca..6757999cab5 100644
--- a/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.sh
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/MyResource.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -21,25 +21,4 @@
# questions.
#
-#
-# @test
-# @bug 6977851
-# @summary NPE from FileURLConnection.connect
-# @build DirPermissionDenied
-# @run shell DirPermissionDenied.sh
-
-TESTDIR="${TESTCLASSES}/DirPermissionDeniedDirectory"
-echo ${TESTDIR}
-
-rm -rf ${TESTDIR}
-mkdir -p ${TESTDIR}
-chmod 333 ${TESTDIR}
-
-$TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES DirPermissionDenied ${TESTDIR}
-result=$?
-
-# Add back read access for user, otherwise not removable on some systems
-chmod u+r ${TESTDIR}
-
-rm -rf ${TESTDIR}
-exit $result
+key=hi
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java
new file mode 100644
index 00000000000..2974da2614f
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m1/p/resources/spi/MyResourceProvider.java
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+package p.resources.spi;
+
+import java.util.spi.ResourceBundleProvider;
+
+
+public interface MyResourceProvider extends ResourceBundleProvider {
+}
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java
new file mode 100644
index 00000000000..78f5a40f627
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/module-info.java
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+
+module m2 {
+ requires m1;
+ provides p.resources.spi.MyResourceProvider with p.internal.BundleProvider;
+}
diff --git a/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java
new file mode 100644
index 00000000000..42edf475064
--- /dev/null
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/internal/BundleProvider.java
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+package p.internal;
+
+import p.resources.spi.MyResourceProvider;
+
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.util.Locale;
+import java.util.ResourceBundle;
+import java.util.spi.AbstractResourceBundleProvider;
+
+public class BundleProvider extends AbstractResourceBundleProvider
+ implements MyResourceProvider {
+ public BundleProvider() {
+ super();
+ }
+ @Override
+ public ResourceBundle getBundle(String baseName, Locale locale) {
+ if (locale.equals(Locale.JAPANESE)) {
+ return super.getBundle(baseName, locale);
+ }
+ return null;
+ }
+}
diff --git a/jdk/test/sun/net/ftp/MarkResetTest.sh b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties
similarity index 56%
rename from jdk/test/sun/net/ftp/MarkResetTest.sh
rename to jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties
index b673e5d4d68..38ffe0d3b94 100644
--- a/jdk/test/sun/net/ftp/MarkResetTest.sh
+++ b/jdk/test/java/util/ResourceBundle/modules/layer/src/m2/p/resources/MyResource_ja.properties
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+# 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
@@ -21,35 +21,4 @@
# questions.
#
-# @test
-# @bug 4673103
-# @run shell/timeout=140 MarkResetTest.sh
-# @summary URLConnection.getContent() hangs over FTP for DOC, PPT, XLS files
-
-OS=`uname -s`
-case "$OS" in
- SunOS | Linux | Darwin | AIX )
- PS=":"
- FS="/"
- ;;
- CYGWIN* )
- PS=";"
- FS="/"
- ;;
- Windows* )
- PS=";"
- FS="\\"
- ;;
- * )
- echo "Unrecognized system!"
- exit 1;
- ;;
-esac
-
-${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}${FS}MarkResetTest.java
-
-# ftp server used by the test requires the file to be present
-# in this directory
-cp ${TESTSRC}${FS}EncDec.doc .
-
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} MarkResetTest
+key=ja
diff --git a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java
similarity index 93%
rename from jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java
index 29fc236fa85..798b6884454 100644
--- a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/jdk/test/resources/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources;
+package jdk.test.resources.spi;
import java.util.Locale;
import java.util.spi.AbstractResourceBundleProvider;
diff --git a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java
index 7725c44188d..3478bae3464 100644
--- a/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/bundles/module-info.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
@@ -22,6 +22,6 @@
*/
module bundles {
- exports jdk.test.resources to test;
- provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProvider;
+ exports jdk.test.resources.spi to test;
+ provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java
index c5ac262f6df..b9aa906b264 100644
--- a/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/simple/src/test/module-info.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
@@ -24,5 +24,5 @@
module test {
requires bundles;
- uses jdk.test.resources.MyResourcesProvider;
+ uses jdk.test.resources.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.java
similarity index 93%
rename from jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.java
index 86d9daf2089..8448f1a6336 100644
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/jdk/test/resources/exported/classes/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources.exported.classes;
+package jdk.test.resources.exported.classes.spi;
import java.util.Locale;
import java.util.spi.AbstractResourceBundleProvider;
diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java
index a110e88d28d..71a68af7fde 100644
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/exported.named.bundles/module-info.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
@@ -25,6 +25,6 @@ module exported.named.bundles {
// unqualified exports to verify that resource bundles are not picked
// up by other named modules
exports jdk.test.resources.exported.classes;
- provides jdk.test.resources.exported.classes.MyResourcesProvider
- with jdk.test.resources.exported.classes.MyResourcesProvider;
+ provides jdk.test.resources.exported.classes.spi.MyResourcesProvider
+ with jdk.test.resources.exported.classes.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.java
similarity index 94%
rename from jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.java
index 70c391c0956..95b9f0b899c 100644
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/classes/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources.classes;
+package jdk.test.resources.classes.spi;
import java.util.Locale;
import java.util.ResourceBundle;
diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.java
similarity index 94%
rename from jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.java
index 73b92fbde35..dcf2f41d530 100644
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/jdk/test/resources/props/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources.props;
+package jdk.test.resources.props.spi;
import java.util.Locale;
import java.util.ResourceBundle;
diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java
index a9fd37f1ed0..78e9a033bcc 100644
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/named.bundles/module-info.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
@@ -22,10 +22,10 @@
*/
module named.bundles {
- exports jdk.test.resources.classes to test; // exports only to test
- exports jdk.test.resources.props to test; // exports only to test
- provides jdk.test.resources.classes.MyResourcesProvider
- with jdk.test.resources.classes.MyResourcesProvider;
- provides jdk.test.resources.props.MyResourcesProvider
- with jdk.test.resources.props.MyResourcesProvider;
+ exports jdk.test.resources.classes.spi to test; // exports only to test
+ exports jdk.test.resources.props.spi to test; // exports only to test
+ provides jdk.test.resources.classes.spi.MyResourcesProvider
+ with jdk.test.resources.classes.spi.MyResourcesProvider;
+ provides jdk.test.resources.props.spi.MyResourcesProvider
+ with jdk.test.resources.props.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java
index 00954c88c86..e6068550dc6 100644
--- a/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/visibility/src/test/module-info.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
@@ -22,8 +22,8 @@
*/
module test {
- // jdk.test.resources.classes.MyResourcesProvider is in named.bundles.
+ // jdk.test.resources.classes.spi.MyResourcesProvider is in named.bundles.
requires named.bundles;
- uses jdk.test.resources.classes.MyResourcesProvider;
- uses jdk.test.resources.props.MyResourcesProvider;
+ uses jdk.test.resources.classes.spi.MyResourcesProvider;
+ uses jdk.test.resources.props.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java
similarity index 96%
rename from jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java
rename to jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.java
index ca4cec531e8..ee8a676983c 100644
--- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/MyResourcesProvider.java
+++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/jdk/test/resources/spi/MyResourcesProvider.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
@@ -21,7 +21,7 @@
* questions.
*/
-package jdk.test.resources;
+package jdk.test.resources.spi;
import java.io.BufferedInputStream;
import java.io.InputStream;
diff --git a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java
index 7725c44188d..3478bae3464 100644
--- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/bundles/module-info.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
@@ -22,6 +22,6 @@
*/
module bundles {
- exports jdk.test.resources to test;
- provides jdk.test.resources.MyResourcesProvider with jdk.test.resources.MyResourcesProvider;
+ exports jdk.test.resources.spi to test;
+ provides jdk.test.resources.spi.MyResourcesProvider with jdk.test.resources.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java
index c5ac262f6df..b9aa906b264 100644
--- a/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.java
+++ b/jdk/test/java/util/ResourceBundle/modules/xmlformat/src/test/module-info.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
@@ -24,5 +24,5 @@
module test {
requires bundles;
- uses jdk.test.resources.MyResourcesProvider;
+ uses jdk.test.resources.spi.MyResourcesProvider;
}
diff --git a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java
index 8c6c4eacda5..53df6e4f755 100644
--- a/jdk/test/java/util/WeakHashMap/GCDuringIteration.java
+++ b/jdk/test/java/util/WeakHashMap/GCDuringIteration.java
@@ -25,6 +25,7 @@
* @test
* @bug 6499848
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main GCDuringIteration
* @summary Check that iterators work properly in the presence of
* concurrent finalization and removal of elements.
diff --git a/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
index 9b52728e56a..73969d46720 100644
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
@@ -26,6 +26,7 @@
* @bug 6450200
* @summary Test proper handling of pool state changes
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm ConfigChanges
* @key randomness
* @author Martin Buchholz
diff --git a/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java
index 149cc66c74c..3299f674adb 100644
--- a/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java
+++ b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java
@@ -27,7 +27,8 @@
* @summary Test the extended API and the aliasing additions in JarFile that
* support multi-release jar files
* @library /lib/testlibrary/java/util/jar /test/lib
- * @build Compiler JarBuilder CreateMultiReleaseTestJars
+ * @build jdk.test.lib.RandomFactory
+ * Compiler JarBuilder CreateMultiReleaseTestJars
* @run testng MultiReleaseJarAPI
*/
diff --git a/jdk/test/java/util/logging/FileHandlerMaxLocksTest.java b/jdk/test/java/util/logging/FileHandlerMaxLocksTest.java
index 74924badd9c..4f19b5be789 100644
--- a/jdk/test/java/util/logging/FileHandlerMaxLocksTest.java
+++ b/jdk/test/java/util/logging/FileHandlerMaxLocksTest.java
@@ -29,6 +29,8 @@
* "logging.properties" file with default value of 100. This property can be
* overriden by specifying this property in the custom config file.
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @author rpatil
* @run main/othervm FileHandlerMaxLocksTest
*/
diff --git a/jdk/test/java/util/regex/RegExTest.java b/jdk/test/java/util/regex/RegExTest.java
index 724052e900d..b61ea07e577 100644
--- a/jdk/test/java/util/regex/RegExTest.java
+++ b/jdk/test/java/util/regex/RegExTest.java
@@ -38,6 +38,7 @@
* 8176029
*
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main RegExTest
* @key randomness
*/
diff --git a/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java b/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java
index 0234016bbe1..a7417bfd96d 100644
--- a/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java
+++ b/jdk/test/java/util/zip/InflaterInputStream/TestAvailable.java
@@ -23,6 +23,7 @@
/* @test
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main TestAvailable
* @bug 7031075 8161426
* @summary Make sure that available() method behaves as expected.
diff --git a/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java b/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
index d5344c3bdf2..0a660e373aa 100644
--- a/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
+++ b/jdk/test/java/util/zip/ZipFile/MultiThreadedReadTest.java
@@ -25,6 +25,8 @@
* @bug 8038491
* @summary Crash in ZipFile.read() when ZipFileInputStream is shared between threads
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run main MultiThreadedReadTest
* @key randomness
*/
diff --git a/jdk/test/java/util/zip/ZipFile/ReadLongZipFileName.java b/jdk/test/java/util/zip/ZipFile/ReadLongZipFileName.java
index 4dc480c67ea..c4e47193e14 100644
--- a/jdk/test/java/util/zip/ZipFile/ReadLongZipFileName.java
+++ b/jdk/test/java/util/zip/ZipFile/ReadLongZipFileName.java
@@ -25,6 +25,9 @@
* @test
* @bug 6374379
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * @run main ReadLongZipFileName
* @summary Verify that we can read zip file names > 255 chars long
*/
diff --git a/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java b/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java
index bee70c019b0..d5611558d27 100644
--- a/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java
+++ b/jdk/test/java/util/zip/ZipFile/ZipEntryFreeTest.java
@@ -25,6 +25,8 @@
* @bug 6907252
* @summary ZipFileInputStream Not Thread-Safe
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run main ZipEntryFreeTest
*/
diff --git a/jdk/test/javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java b/jdk/test/javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java
index 3b722971385..e2eb71d6fec 100644
--- a/jdk/test/javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java
+++ b/jdk/test/javax/imageio/plugins/tiff/MultiPageTest/MultiPageTest.java
@@ -32,6 +32,7 @@
* (number of pages, sizes, colors). Use -Dseed=X to set
* the random generator seed.
*
+ * @build jdk.test.lib.RandomFactory
* @run main MultiPageTest
* @key randomness
*/
diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java
index cf31ffd3122..47a9f4819b2 100644
--- a/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSIncorrectAppDataTest.java
@@ -35,6 +35,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=DTLS
* -Dtest.mode=norm DTLSIncorrectAppDataTest
* @run main/othervm -Dtest.security.protocol=DTLS
diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java
index de31945ab54..520a6590b46 100644
--- a/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSRehandshakeWithCipherChangeTest.java
@@ -35,6 +35,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=DTLS
* DTLSRehandshakeWithCipherChangeTest
*/
diff --git a/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java b/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java
index 82f7df7d5d8..22fe13ab127 100644
--- a/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java
+++ b/jdk/test/javax/net/ssl/DTLS/DTLSSequenceNumberTest.java
@@ -36,6 +36,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=DTLS
* -Dtest.mode=norm DTLSSequenceNumberTest
* @run main/othervm -Dtest.security.protocol=DTLS
diff --git a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java
index 98fb334a4ff..4fab3a839da 100644
--- a/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java
+++ b/jdk/test/javax/net/ssl/DTLSv10/DTLSv10RehandshakeWithCipherChangeTest.java
@@ -35,6 +35,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=DTLSv1.0
* DTLSv10RehandshakeWithCipherChangeTest
*/
diff --git a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java
index d154c27d331..23da9a2ab5b 100644
--- a/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java
+++ b/jdk/test/javax/net/ssl/TLS/TLSRehandshakeWithCipherChangeTest.java
@@ -35,6 +35,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=TLS TLSRehandshakeWithCipherChangeTest
*/
diff --git a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java
index c7a8a8cf5ec..65491312ca5 100644
--- a/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java
+++ b/jdk/test/javax/net/ssl/TLSv1/TLSRehandshakeWithCipherChangeTest.java
@@ -35,6 +35,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=TLSv1 TLSRehandshakeWithCipherChangeTest
*/
diff --git a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java
index d94b2e65eda..bb12218ba7e 100644
--- a/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java
+++ b/jdk/test/javax/net/ssl/TLSv11/TLSRehandshakeWithCipherChangeTest.java
@@ -35,6 +35,7 @@
* java.security.jgss/sun.security.krb5.internal.crypto
* java.security.jgss/sun.security.krb5.internal.ktab
* java.base/sun.security.util
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Dtest.security.protocol=TLSv1.1 TLSRehandshakeWithCipherChangeTest
*/
diff --git a/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java b/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java
index aff92170577..881dc6969ef 100644
--- a/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java
+++ b/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java
@@ -27,8 +27,12 @@
* @library /test/lib
* @modules java.base/jdk.internal.ref
* java.base/jdk.internal.misc
- * @build jdk.test.lib.*
- * @build jdk.test.lib.process.*
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main ExitOnThrow
* @summary Ensure that if a cleaner throws an exception then the VM exits
*/
diff --git a/jdk/test/jdk/internal/util/jar/TestVersionedStream.java b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java
index 9a370d27df0..c7c0c8783b4 100644
--- a/jdk/test/jdk/internal/util/jar/TestVersionedStream.java
+++ b/jdk/test/jdk/internal/util/jar/TestVersionedStream.java
@@ -27,6 +27,8 @@
* @summary basic tests for multi-release jar versioned streams
* @library /test/lib
* @modules jdk.jartool/sun.tools.jar java.base/jdk.internal.util.jar
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run testng TestVersionedStream
*/
diff --git a/jdk/test/jdk/modules/incubator/ImageModules.java b/jdk/test/jdk/modules/incubator/ImageModules.java
index 857abca8dc3..e569a175acc 100644
--- a/jdk/test/jdk/modules/incubator/ImageModules.java
+++ b/jdk/test/jdk/modules/incubator/ImageModules.java
@@ -28,7 +28,9 @@
* @library /lib/testlibrary /test/lib
* @key intermittent
* @modules jdk.compiler jdk.jartool jdk.jlink
- * @build jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.compiler.CompilerUtils
* @run testng/othervm ImageModules
*/
diff --git a/jdk/test/jdk/security/jarsigner/Spec.java b/jdk/test/jdk/security/jarsigner/Spec.java
index 07e46851e6f..1b3a12c7419 100644
--- a/jdk/test/jdk/security/jarsigner/Spec.java
+++ b/jdk/test/jdk/security/jarsigner/Spec.java
@@ -30,6 +30,8 @@
* java.base/sun.security.provider.certpath
* jdk.jartool
* jdk.crypto.ec
+ * @build jdk.test.lib.util.JarUtils
+ * @run main Spec
*/
import com.sun.jarsigner.ContentSigner;
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/TimeLimitedRunner.java b/jdk/test/lib/testlibrary/jdk/testlibrary/TimeLimitedRunner.java
deleted file mode 100644
index 5cc98ea8f8a..00000000000
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/TimeLimitedRunner.java
+++ /dev/null
@@ -1,86 +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.
- *
- * 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 jdk.testlibrary;
-
-import java.util.Objects;
-import java.util.concurrent.Callable;
-
-/**
- * Auxiliary class to run target w/ given timeout.
- */
-public class TimeLimitedRunner implements Callable {
- private final long stoptime;
- private final long timeout;
- private final double factor;
- private final Callable target;
-
- /**
- * @param timeout a timeout. zero means no time limitation
- * @param factor a multiplier used to estimate next iteration time
- * @param target a target to run
- * @throws NullPointerException if target is null
- * @throws IllegalArgumentException if timeout is negative or
- factor isn't positive
- */
- public TimeLimitedRunner(long timeout, double factor,
- Callable target) {
- Objects.requireNonNull(target, "target must not be null");
- if (timeout < 0) {
- throw new IllegalArgumentException("timeout[" + timeout + "] < 0");
- }
- if (factor <= 0d) {
- throw new IllegalArgumentException("factor[" + factor + "] <= 0");
- }
- this.stoptime = System.currentTimeMillis() + timeout;
- this.timeout = timeout;
- this.factor = factor;
- this.target = target;
- }
-
- /**
- * Runs @{linkplan target} while it returns true and timeout isn't exceeded
- */
- @Override
- public Void call() throws Exception {
- long maxDuration = 0L;
- long iterStart = System.currentTimeMillis();
- if (timeout != 0 && iterStart > stoptime) {
- return null;
- }
- while (target.call()) {
- if (timeout != 0) {
- long iterDuration = System.currentTimeMillis() - iterStart;
- maxDuration = Math.max(maxDuration, iterDuration);
- iterStart = System.currentTimeMillis();
- if (iterStart + (maxDuration * factor) > stoptime) {
- System.out.println("Not enough time to continue execution. "
- + "Interrupted.");
- break;
- }
- }
- }
- return null;
- }
-
-}
diff --git a/jdk/test/sun/misc/SunMiscSignalTest.java b/jdk/test/sun/misc/SunMiscSignalTest.java
index 33d4d3ac41c..056843e673c 100644
--- a/jdk/test/sun/misc/SunMiscSignalTest.java
+++ b/jdk/test/sun/misc/SunMiscSignalTest.java
@@ -46,7 +46,12 @@ import sun.misc.SignalHandler;
* @library /test/lib
* @modules jdk.unsupported
* java.base/jdk.internal.misc
- * @build jdk.test.lib.Platform jdk.test.lib.Utils
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng/othervm -Xrs -DXrs=true SunMiscSignalTest
* @run testng/othervm SunMiscSignalTest
* @summary sun.misc.Signal test
diff --git a/jdk/test/sun/net/InetAddress/nameservice/dns/CNameTest.java b/jdk/test/sun/net/InetAddress/nameservice/dns/CNameTest.java
new file mode 100644
index 00000000000..3836947eea4
--- /dev/null
+++ b/jdk/test/sun/net/InetAddress/nameservice/dns/CNameTest.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+import jdk.test.lib.process.ProcessTools;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardOpenOption;
+
+/**
+ * @test
+ * @bug 4763315
+ * @modules java.naming
+ * @library /test/lib
+ * @build CanonicalName Lookup jdk.test.lib.process.*
+ * @run main/othervm/timeout=120 CNameTest
+ * @summary Test DNS provider's handling of CNAME records
+ */
+public class CNameTest {
+ private static final String HOST = "www-proxy.us.oracle.com";
+ private static final String POLICY = "grant {" + System.lineSeparator() +
+ " permission java.net .SocketPermission \"${HOST}\", \"resolve\";" +
+ System.lineSeparator() + "};";
+
+ public static void main(String[] args) throws Exception {
+ // Prerequisite check
+ int rc = ProcessTools.executeTestJava("CanonicalName", HOST)
+ .outputTo(System.out)
+ .errorTo(System.out)
+ .getExitValue();
+ if (rc != 0) {
+ System.out.println("DNS not configured or host doesn't" +
+ " resolve to CNAME record");
+ return;
+ }
+
+ // Tests - with & without security manager
+ Path policy = Paths.get(".", "java.policy");
+ Files.write(policy, POLICY.getBytes(), StandardOpenOption.CREATE_NEW);
+ String[] opts = new String[]{
+ "-Dsun.net.spi.nameservice.provider.1=dns,sun",
+ "-Djava.security.manager -Djava.security.policy=" + policy
+ };
+ for (String opt : opts) {
+ ProcessTools.executeTestJava(opt, "Lookup", HOST)
+ .outputTo(System.out)
+ .errorTo(System.err)
+ .shouldHaveExitValue(0);
+ }
+ }
+}
+
diff --git a/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh b/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh
deleted file mode 100644
index a93f2652613..00000000000
--- a/jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/sh
-
-#
-# Copyright (c) 2002, 2016, 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 4763315
-# @modules java.naming
-# @build CanonicalName Lookup
-# @run shell/timeout=120 cname.sh
-# @summary Test DNS provider's handling of CNAME records
-
-
-# The host that we try to resolve
-
-HOST=www-proxy.us.oracle.com
-
-# fail gracefully if DNS is not configured or there
-# isn't a CNAME record.
-
-CLASSPATH=${TESTCLASSES}
-export CLASSPATH
-JAVA="${TESTJAVA}/bin/java"
-
-sh -xc "$JAVA ${TESTVMOPTS} CanonicalName $HOST" 2>&1
-if [ $? != 0 ]; then
- echo "DNS not configured or host doesn't resolve to CNAME record"
- exit 0
-fi
-
-failures=0
-
-go() {
- echo ''
- sh -xc "$JAVA ${TESTVMOPTS} $1 Lookup $2" 2>&1
- if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
-}
-
-# Tests - with & without security manager
-
-POLICY=java.policy
-echo "grant {" > ${POLICY}
-echo " permission java.net.SocketPermission \"${HOST}\", \"resolve\";" >> ${POLICY}
-echo "};" >> ${POLICY}
-
-np="-Dsun.net.spi.nameservice.provider.1=dns,sun"
-sm="-Djava.security.manager -Djava.security.policy=${POLICY}"
-
-go "" "$HOST"
-go "$sm" "$HOST"
-
-
-#
-# Results
-#
-echo ''
-if [ $failures -gt 0 ];
- then echo "$failures test(s) failed";
- else echo "All test(s) passed"; fi
-exit $failures
diff --git a/jdk/test/sun/net/ftp/MarkResetTest.java b/jdk/test/sun/net/ftp/MarkResetTest.java
index 1f9e1bdec94..d3236fe5544 100644
--- a/jdk/test/sun/net/ftp/MarkResetTest.java
+++ b/jdk/test/sun/net/ftp/MarkResetTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2013, 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
@@ -22,15 +22,30 @@
*/
/*
- *
- * run from MarkResetTest.sh
+ * @test
+ * @bug 4673103
+ * @run main/othervm/timeout=140 MarkResetTest
+ * @summary URLConnection.getContent() hangs over FTP for DOC, PPT, XLS files
*/
-import java.io.*;
-import java.net.*;
-import java.util.regex.*;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.file.Files;
+import java.nio.file.Paths;
public class MarkResetTest {
+ private static final String FILE_NAME = "EncDec.doc";
/**
* A class that simulates, on a separate, an FTP server.
@@ -388,7 +403,9 @@ public class MarkResetTest {
}
public static void main(String[] args) throws Exception {
- MarkResetTest test = new MarkResetTest();
+ Files.copy(Paths.get(System.getProperty("test.src"), FILE_NAME),
+ Paths.get(".", FILE_NAME));
+ new MarkResetTest();
}
public MarkResetTest() {
@@ -402,9 +419,8 @@ public class MarkResetTest {
port = server.getPort();
}
- String filename = "EncDec.doc";
- URL url = new URL("ftp://localhost:" + port + "/" +
- filename);
+
+ URL url = new URL("ftp://localhost:" + port + "/" + FILE_NAME);
URLConnection con = url.openConnection();
System.out.println("getContent: " + con.getContent());
@@ -438,7 +454,7 @@ public class MarkResetTest {
server.interrupt();
// Did we pass ?
- if (len != (new File(filename)).length()) {
+ if (len != (new File(FILE_NAME)).length()) {
throw new Exception("Failed to read the file correctly");
}
System.out.println("PASSED: File read correctly");
diff --git a/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.java b/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.java
index 7ffe3a1d67c..a391428f329 100644
--- a/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.java
+++ b/jdk/test/sun/net/www/protocol/file/DirPermissionDenied.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 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
@@ -21,14 +21,36 @@
* questions.
*/
+/**
+ * @test
+ * @bug 6977851
+ * @summary NPE from FileURLConnection.connect
+ * @library /test/lib
+ * @build DirPermissionDenied jdk.test.lib.process.*
+ * jdk.test.lib.util.FileUtils
+ * @run testng DirPermissionDenied
+ */
+
+import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
-import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.util.FileUtils;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeTest;
public class DirPermissionDenied {
- public static void main(String[] args) throws Exception {
- URL url = new URL("file:" + args[0]);
+ private static final Path TEST_DIR = Paths.get(
+ "DirPermissionDeniedDirectory");
+ @Test
+ public void doTest() throws MalformedURLException {
+ URL url = new URL(TEST_DIR.toUri().toString());
try {
URLConnection uc = url.openConnection();
uc.connect();
@@ -56,4 +78,20 @@ public class DirPermissionDenied {
throw new RuntimeException("Failed " + e);
}
}
+
+ @BeforeTest
+ public void setup() throws Throwable {
+ // mkdir and chmod "333"
+ Files.createDirectories(TEST_DIR);
+ ProcessTools.executeCommand("chmod", "333", TEST_DIR.toString())
+ .outputTo(System.out)
+ .errorTo(System.out)
+ .shouldHaveExitValue(0);
+ }
+
+ @AfterTest
+ public void tearDown() throws IOException {
+ FileUtils.deleteFileIfExistsWithRetry(TEST_DIR);
+ }
}
+
diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java
index be761a789a7..62cbc93e492 100644
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/B6216082.java
@@ -32,7 +32,9 @@
* @summary Redirect problem with HttpsURLConnection using a proxy
* @modules java.base/sun.net.www
* @library .. /test/lib
- * @build HttpCallback TestHttpsServer ClosedChannelList
+ * @build jdk.test.lib.NetworkConfiguration
+ * jdk.test.lib.Platform
+ * HttpCallback TestHttpsServer ClosedChannelList
* HttpTransaction TunnelProxy
* @key intermittent
* @run main/othervm B6216082
diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java
index 8393a4ef4a2..eeb1150464e 100644
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.java
@@ -39,6 +39,12 @@ import jdk.test.lib.process.ProcessTools;
* that serves http POST method requests in secure channel, and a client
* that makes https POST request through a proxy.
* @library /test/lib
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @compile OriginServer.java ProxyTunnelServer.java
* @run main/othervm PostThruProxy
*/
diff --git a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java
index daf75bc65dc..0c6c06facaf 100644
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.java
@@ -39,6 +39,12 @@ import jdk.test.lib.process.ProcessTools;
* http POST method requests in secure channel, and a client that
* makes https POST request through a proxy.
* @library /test/lib
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @compile OriginServer.java ProxyTunnelServer.java
* @run main/othervm -Djdk.http.auth.tunneling.disabledSchemes= PostThruProxyWithAuth
*/
diff --git a/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java b/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java
index 2af75f452ad..16a59d65dc2 100644
--- a/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java
+++ b/jdk/test/sun/net/www/protocol/jar/GetContentTypeTest.java
@@ -25,9 +25,13 @@
* @test
* @bug 4274624
* @library /test/lib
- * @build GetContentType GetContentTypeTest
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
* jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
* jdk.test.lib.process.*
+ * GetContentType GetContentTypeTest
* @run main/othervm GetContentTypeTest
* @summary Test JarURLConnection.getContentType would
* would return default "content/unknown"
diff --git a/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java b/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java
index 977034603a0..7867bc6f870 100644
--- a/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java
+++ b/jdk/test/sun/net/www/protocol/jar/jarbug/TestDriver.java
@@ -27,10 +27,14 @@
* @library /test/lib
* /lib/testlibrary
* @modules jdk.compiler
- * @build src.test.src.TestDriver JarUtils
- * jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
* jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
* jdk.test.lib.process.*
+ * src.test.src.TestDriver JarUtils
* @summary various resource and classloading bugs related to jar files
* @run main/othervm TestDriver
*/
diff --git a/jdk/test/sun/net/www/protocol/jrt/OtherResourcesTest.java b/jdk/test/sun/net/www/protocol/jrt/OtherResourcesTest.java
new file mode 100644
index 00000000000..00ec82282e0
--- /dev/null
+++ b/jdk/test/sun/net/www/protocol/jrt/OtherResourcesTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+import jdk.test.lib.JDKToolFinder;
+import static jdk.test.lib.process.ProcessTools.executeCommand;
+
+/**
+ * @test
+ * @bug 8142968
+ * @summary Access a jrt:/ resource in an observable module that is not in
+ * the boot layer and hence not known to the built-in class loaders.
+ * This test is intended to run with --limit-modules.
+ * @library /test/lib
+ * @build OtherResources OtherResourcesTest
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.process.*
+ * @run main OtherResourcesTest
+ */
+public class OtherResourcesTest {
+ public static void main(String[] args) throws Throwable {
+ String classes = System.getProperty("test.classes");
+ executeCommand(JDKToolFinder.getTestJDKTool("java"),
+ "--limit-modules", "java.base",
+ "-cp", classes, "OtherResources")
+ .outputTo(System.out)
+ .errorTo(System.out)
+ .shouldHaveExitValue(0);
+ }
+}
+
diff --git a/jdk/test/sun/nio/cs/FindDecoderBugs.java b/jdk/test/sun/nio/cs/FindDecoderBugs.java
index 6868ce297ec..175a22c4723 100644
--- a/jdk/test/sun/nio/cs/FindDecoderBugs.java
+++ b/jdk/test/sun/nio/cs/FindDecoderBugs.java
@@ -26,6 +26,7 @@
* @bug 6380723
* @summary Decode many byte sequences in many ways (use -Dseed=X to set PRNG seed)
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main/timeout=1800 FindDecoderBugs
* @author Martin Buchholz
* @key randomness
diff --git a/jdk/test/sun/nio/cs/FindEncoderBugs.java b/jdk/test/sun/nio/cs/FindEncoderBugs.java
index 091686593f1..77bb3ba094d 100644
--- a/jdk/test/sun/nio/cs/FindEncoderBugs.java
+++ b/jdk/test/sun/nio/cs/FindEncoderBugs.java
@@ -26,6 +26,7 @@
* @bug 6233345 6381699 6381702 6381705 6381706
* @summary Encode many char sequences in many ways
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @run main/timeout=1200 FindEncoderBugs
* @author Martin Buchholz
* @key randomness
diff --git a/jdk/test/sun/security/ec/SignatureOffsets.java b/jdk/test/sun/security/ec/SignatureOffsets.java
index 288ca39731e..3570258c861 100644
--- a/jdk/test/sun/security/ec/SignatureOffsets.java
+++ b/jdk/test/sun/security/ec/SignatureOffsets.java
@@ -35,6 +35,7 @@ import java.security.SignatureException;
* generation, the test tries to verify signature with the above API
* and passing in different signature offset (0, 33, 66, 99).
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @compile ../../../java/security/Signature/Offsets.java
* @run main SignatureOffsets SunEC NONEwithECDSA
* @run main SignatureOffsets SunEC SHA1withECDSA
diff --git a/jdk/test/sun/security/krb5/auto/ModuleName.java b/jdk/test/sun/security/krb5/auto/ModuleName.java
index 499d35ac3a1..fb59d33789b 100644
--- a/jdk/test/sun/security/krb5/auto/ModuleName.java
+++ b/jdk/test/sun/security/krb5/auto/ModuleName.java
@@ -27,6 +27,12 @@
* @summary GSSContext type when jdk.security.jgss is not available
* @library /test/lib
* @compile -XDignore.symbol.file ModuleName.java
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main/othervm ModuleName
*/
diff --git a/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java b/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java
index d138d928289..6b14f144841 100644
--- a/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java
+++ b/jdk/test/sun/security/krb5/auto/ReplayCacheTestProc.java
@@ -26,6 +26,7 @@
* @bug 7152176 8168518 8172017
* @summary More krb5 tests
* @library ../../../../java/security/testlibrary/ /test/lib
+ * @build jdk.test.lib.Platform
* @run main/othervm/timeout=300 ReplayCacheTestProc
*/
diff --git a/jdk/test/sun/security/krb5/auto/rcache_usemd5.sh b/jdk/test/sun/security/krb5/auto/rcache_usemd5.sh
index 0d9a7d7a129..59907d5c7bd 100644
--- a/jdk/test/sun/security/krb5/auto/rcache_usemd5.sh
+++ b/jdk/test/sun/security/krb5/auto/rcache_usemd5.sh
@@ -24,6 +24,7 @@
# @test
# @bug 8168518
# @library ../../../../java/security/testlibrary/ /test/lib
+# @build jdk.test.lib.Platform
# @run main/othervm/timeout=300 -Djdk.krb5.rcache.useMD5=true
# -Dtest.service=host ReplayCacheTestProc
# @summary testing jdk.krb5.rcache.useMD5. This action is put in a separate
diff --git a/jdk/test/sun/security/mscapi/SignatureOffsets.java b/jdk/test/sun/security/mscapi/SignatureOffsets.java
index e0d2a816fda..bff9620dc74 100644
--- a/jdk/test/sun/security/mscapi/SignatureOffsets.java
+++ b/jdk/test/sun/security/mscapi/SignatureOffsets.java
@@ -35,6 +35,7 @@ import java.security.SignatureException;
* generation, the test tries to verify signature with the above API
* and passing in different signature offset (0, 33, 66, 99).
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @compile ../../../java/security/Signature/Offsets.java
* @requires os.family == "windows"
* @run main SignatureOffsets SunMSCAPI NONEwithRSA
diff --git a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
index 9ffab3d5051..9662db995d2 100644
--- a/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
+++ b/jdk/test/sun/security/pkcs11/rsa/TestKeyPairGenerator.java
@@ -29,6 +29,7 @@
* @library ..
* @library /test/lib
* @modules jdk.crypto.cryptoki
+ * @build jdk.test.lib.RandomFactory
* @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
* @run main/othervm -Djava.security.debug=sunpkcs11 TestKeyPairGenerator
* sm TestKeyPairGenerator.policy
diff --git a/jdk/test/sun/security/rsa/SignatureOffsets.java b/jdk/test/sun/security/rsa/SignatureOffsets.java
index bebaa8ba1f8..c8700225853 100644
--- a/jdk/test/sun/security/rsa/SignatureOffsets.java
+++ b/jdk/test/sun/security/rsa/SignatureOffsets.java
@@ -35,6 +35,7 @@ import java.security.SignatureException;
* generation, the test tries to verify signature with the above API
* and passing in different signature offset (0, 33, 66, 99).
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @compile ../../../java/security/Signature/Offsets.java
* @run main SignatureOffsets SunRsaSign MD2withRSA
* @run main SignatureOffsets SunRsaSign MD5withRSA
diff --git a/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java b/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java
index 2a6ffb2d135..fad928f5503 100644
--- a/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java
+++ b/jdk/test/sun/security/ssl/CertPathRestrictions/TLSRestrictions.java
@@ -48,8 +48,15 @@ import jdk.test.lib.process.ProcessTools;
/*
* @test
+ * @bug 8165367
* @summary Verify the restrictions for certificate path on JSSE with custom trust store.
* @library /test/lib
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @compile JSSEClient.java
* @run main/othervm -Djava.security.debug=certpath TLSRestrictions DEFAULT
* @run main/othervm -Djava.security.debug=certpath TLSRestrictions C1
diff --git a/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java b/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java
index 9b761d3a6fc..9f3110cae21 100644
--- a/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java
+++ b/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java
@@ -35,6 +35,7 @@ import java.security.SignatureException;
* generation, the test tries to verify signature with the above API
* and passing in different signature offset (0, 33, 66, 99).
* @library /test/lib
+ * @build jdk.test.lib.RandomFactory
* @compile ../../../../java/security/Signature/Offsets.java
* @run main SignatureOffsets SunJSSE MD2withRSA
* @run main SignatureOffsets SunJSSE MD5withRSA
diff --git a/jdk/test/sun/security/tools/jarsigner/AltProvider.java b/jdk/test/sun/security/tools/jarsigner/AltProvider.java
index f44f9e42213..e2c8e093042 100644
--- a/jdk/test/sun/security/tools/jarsigner/AltProvider.java
+++ b/jdk/test/sun/security/tools/jarsigner/AltProvider.java
@@ -27,6 +27,15 @@
* @summary -providerPath, -providerClass, -addprovider, and -providerArg
* @library /test/lib
* @modules java.base/jdk.internal.misc
+ * @build jdk.test.lib.util.JarUtils
+ * jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * @run main AltProvider
*/
import jdk.test.lib.JDKToolLauncher;
diff --git a/jdk/test/sun/security/tools/jarsigner/Options.java b/jdk/test/sun/security/tools/jarsigner/Options.java
index ed2dda9ba96..bf736e47cfa 100644
--- a/jdk/test/sun/security/tools/jarsigner/Options.java
+++ b/jdk/test/sun/security/tools/jarsigner/Options.java
@@ -31,6 +31,8 @@
* jdk.jartool/sun.security.tools.jarsigner
* java.base/sun.security.pkcs
* java.base/sun.security.x509
+ * @build jdk.test.lib.util.JarUtils
+ * @run main Options
*/
import com.sun.jarsigner.ContentSigner;
diff --git a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java
index 795ec89eb0b..dac7d43923f 100644
--- a/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java
+++ b/jdk/test/sun/security/tools/jarsigner/TimestampCheck.java
@@ -68,6 +68,14 @@ import sun.security.x509.X500Name;
* java.base/sun.security.tools.keytool
* @library /lib/testlibrary
* @library /test/lib
+ * @build jdk.test.lib.util.JarUtils
+ * jdk.test.lib.SecurityTools
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main/timeout=600 TimestampCheck
*/
public class TimestampCheck {
diff --git a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java
index 8c07047586a..79d9f1ad267 100644
--- a/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/TsacertOptionTest.java
@@ -36,6 +36,7 @@ import jdk.test.lib.util.JarUtils;
* java.base/sun.security.util
* java.base/sun.security.x509
* java.management
+ * @build jdk.test.lib.util.JarUtils
* @run main TsacertOptionTest
*/
public class TsacertOptionTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/Warning.java b/jdk/test/sun/security/tools/jarsigner/Warning.java
index c4760c488fc..a2dfd582f95 100644
--- a/jdk/test/sun/security/tools/jarsigner/Warning.java
+++ b/jdk/test/sun/security/tools/jarsigner/Warning.java
@@ -35,6 +35,8 @@ import java.util.Arrays;
* @bug 8024302 8026037 8130132
* @summary warnings, errors and -strict
* @library /lib/testlibrary /test/lib
+ * @build jdk.test.lib.util.JarUtils
+ * @run main Warning
*/
public class Warning {
diff --git a/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java b/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java
index 2051c2525b3..4097c02e6c2 100644
--- a/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/multiRelease/MVJarSigningTest.java
@@ -26,6 +26,13 @@
* @bug 8047305 8075618
* @summary Tests jarsigner tool and JarSigner API work with multi-release JAR files.
* @library /test/lib
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main MVJarSigningTest
*/
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/AliasNotInStoreTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/AliasNotInStoreTest.java
index 2e0bac3f740..dc19edb3571 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/AliasNotInStoreTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/AliasNotInStoreTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for aliasNotInStore warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main AliasNotInStoreTest
*/
public class AliasNotInStoreTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/BadExtendedKeyUsageTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/BadExtendedKeyUsageTest.java
index f0d45d7750a..a2a081bf655 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/BadExtendedKeyUsageTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/BadExtendedKeyUsageTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for badExtendedKeyUsage warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main BadExtendedKeyUsageTest
*/
public class BadExtendedKeyUsageTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java
index 2a3c79a6a63..7a1e243c31b 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java
@@ -30,6 +30,7 @@ import jdk.test.lib.util.JarUtils;
* @summary Test for badKeyUsage warning
* @library /lib/testlibrary /test/lib ../
* @ignore until 8026393 is fixed
+ * @build jdk.test.lib.util.JarUtils
* @run main BadKeyUsageTest
*/
public class BadKeyUsageTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/BadNetscapeCertTypeTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/BadNetscapeCertTypeTest.java
index 742b36f5bb0..1dd605caebc 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/BadNetscapeCertTypeTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/BadNetscapeCertTypeTest.java
@@ -33,6 +33,7 @@ import java.util.Base64;
* @bug 8024302 8026037
* @summary Test for badNetscapeCertType warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main BadNetscapeCertTypeTest
*/
public class BadNetscapeCertTypeTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/ChainNotValidatedTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/ChainNotValidatedTest.java
index 197a4137538..d46bc065af0 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/ChainNotValidatedTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/ChainNotValidatedTest.java
@@ -31,6 +31,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for chainNotValidated warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main ChainNotValidatedTest
*/
public class ChainNotValidatedTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiredCertTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiredCertTest.java
index 10d6f9358a9..99595905b66 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiredCertTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiredCertTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for hasExpiredCert warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main HasExpiredCertTest
*/
public class HasExpiredCertTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiringCertTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiringCertTest.java
index be936dcbec3..a991ebcba89 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiringCertTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/HasExpiringCertTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for hasExpiringCert warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main HasExpiringCertTest
*/
public class HasExpiringCertTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/HasUnsignedEntryTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/HasUnsignedEntryTest.java
index a4ffdae18d6..17653478891 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/HasUnsignedEntryTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/HasUnsignedEntryTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for hasUnsignedEntry warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main HasUnsignedEntryTest
*/
public class HasUnsignedEntryTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/MultipleWarningsTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/MultipleWarningsTest.java
index 73ccb0e6562..07aa895ab3a 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/MultipleWarningsTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/MultipleWarningsTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Checks if jarsigner prints appropriate warnings
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main MultipleWarningsTest
*/
public class MultipleWarningsTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/NoTimestampTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/NoTimestampTest.java
index 5fda7782fd6..ac506f42bb1 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/NoTimestampTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/NoTimestampTest.java
@@ -30,6 +30,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Checks warnings if -tsa and -tsacert options are not specified
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main NoTimestampTest
*/
public class NoTimestampTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/NotSignedByAliasTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/NotSignedByAliasTest.java
index 041b715d46b..d4e8982f2f7 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/NotSignedByAliasTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/NotSignedByAliasTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for notSignedByAlias warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main NotSignedByAliasTest
*/
public class NotSignedByAliasTest extends Test {
diff --git a/jdk/test/sun/security/tools/jarsigner/warnings/NotYetValidCertTest.java b/jdk/test/sun/security/tools/jarsigner/warnings/NotYetValidCertTest.java
index a63ab253e96..937082c16a9 100644
--- a/jdk/test/sun/security/tools/jarsigner/warnings/NotYetValidCertTest.java
+++ b/jdk/test/sun/security/tools/jarsigner/warnings/NotYetValidCertTest.java
@@ -29,6 +29,7 @@ import jdk.test.lib.util.JarUtils;
* @bug 8024302 8026037
* @summary Test for notYetValidCert warning
* @library /lib/testlibrary /test/lib ../
+ * @build jdk.test.lib.util.JarUtils
* @run main NotYetValidCertTest
*/
public class NotYetValidCertTest extends Test {
diff --git a/jdk/test/sun/security/tools/keytool/ImportPrompt.java b/jdk/test/sun/security/tools/keytool/ImportPrompt.java
index 50bd690371e..ab61b04b93d 100644
--- a/jdk/test/sun/security/tools/keytool/ImportPrompt.java
+++ b/jdk/test/sun/security/tools/keytool/ImportPrompt.java
@@ -33,6 +33,14 @@ import java.security.KeyStore;
* @bug 8172975
* @summary SecurityTools.keytool() needs to accept user input
* @library /test/lib
+ * @build jdk.test.lib.SecurityTools
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * @run main ImportPrompt
*/
public class ImportPrompt {
diff --git a/jdk/test/sun/security/tools/keytool/PrintSSL.java b/jdk/test/sun/security/tools/keytool/PrintSSL.java
index 2f4a4ff8b59..ea9c6147af3 100644
--- a/jdk/test/sun/security/tools/keytool/PrintSSL.java
+++ b/jdk/test/sun/security/tools/keytool/PrintSSL.java
@@ -26,6 +26,13 @@
* @bug 6480981 8160624
* @summary keytool should be able to import certificates from remote SSL server
* @library /test/lib
+ * @build jdk.test.lib.SecurityTools
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main/othervm PrintSSL
*/
diff --git a/jdk/test/sun/security/tools/keytool/ReadJar.java b/jdk/test/sun/security/tools/keytool/ReadJar.java
index ef6d1c868b9..464936cfc07 100644
--- a/jdk/test/sun/security/tools/keytool/ReadJar.java
+++ b/jdk/test/sun/security/tools/keytool/ReadJar.java
@@ -26,6 +26,15 @@
* @bug 6890872 8168882
* @summary keytool -printcert to recognize signed jar files
* @library /test/lib
+ * @build jdk.test.lib.SecurityTools
+ * jdk.test.lib.util.JarUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * @run main ReadJar
*/
import java.nio.file.Files;
diff --git a/jdk/test/sun/security/tools/keytool/WeakAlg.java b/jdk/test/sun/security/tools/keytool/WeakAlg.java
index bb7ae777371..d570a79e800 100644
--- a/jdk/test/sun/security/tools/keytool/WeakAlg.java
+++ b/jdk/test/sun/security/tools/keytool/WeakAlg.java
@@ -30,6 +30,13 @@
* @modules java.base/sun.security.tools.keytool
* java.base/sun.security.tools
* java.base/sun.security.util
+ * @build jdk.test.lib.SecurityTools
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run main/othervm/timeout=600 -Duser.language=en -Duser.country=US WeakAlg
*/
diff --git a/jdk/test/sun/security/util/DerInputBuffer/TimeParsing.java b/jdk/test/sun/security/util/DerInputBuffer/TimeParsing.java
index f49701a438c..e387f26d88e 100644
--- a/jdk/test/sun/security/util/DerInputBuffer/TimeParsing.java
+++ b/jdk/test/sun/security/util/DerInputBuffer/TimeParsing.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2003, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4558835 4915146
+ * @bug 4558835 4915146 8181841
* @summary Verify timezone offset and fractional seconds are correctly parsed
* @modules java.base/sun.security.util
*/
@@ -77,6 +77,10 @@ public class TimeParsing {
private final static byte[] GEN_FRACT3_ZULU =
{0x18, 0x13, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x37, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x5a};
+ // 20010810174351.7654Z
+ private final static byte[] GEN_FRACT4_ZULU =
+ {0x18, 0x14, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x37, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x34, 0x5a};
+
// 20010810184351.7+0100
private final static byte[] GEN_FRACT1_PLUS1 =
{0x18, 0x15, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x2b, 0x30, 0x31, 0x30, 0x30};
@@ -89,10 +93,17 @@ public class TimeParsing {
private final static byte[] GEN_FRACT3_PLUS1 =
{0x18, 0x17, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x2b, 0x30, 0x31, 0x30, 0x30};
+ // 20010810184351.7654+0100
+ private final static byte[] GEN_FRACT4_PLUS1 =
+ {0x18, 0x18, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2e, 0x37, 0x36, 0x35, 0x34, 0x2b, 0x30, 0x31, 0x30, 0x30};
+
// 20010810184351,765+0100
private final static byte[] GEN_FRACT3_COMMA_PLUS1 =
{0x18, 0x17, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2c, 0x37, 0x36, 0x35, 0x2b, 0x30, 0x31, 0x30, 0x30};
+ // 20010810184351,7654+0100
+ private final static byte[] GEN_FRACT4_COMMA_PLUS1 =
+ {0x18, 0x18, 0x32, 0x30, 0x30, 0x31, 0x30, 0x38, 0x31, 0x30, 0x31, 0x38, 0x34, 0x33, 0x35, 0x31, 0x2c, 0x37, 0x36, 0x35, 0x34, 0x2b, 0x30, 0x31, 0x30, 0x30};
private static Date decodeUTC(byte[] b) throws IOException {
DerInputStream derin = new DerInputStream(b);
@@ -146,6 +157,8 @@ public class TimeParsing {
checkGeneralized(d3, GEN_FRACT3_ZULU, "fractional seconds (Zulu)");
checkGeneralized(d3, GEN_FRACT3_PLUS1, "fractional seconds (+0100)");
checkGeneralized(d3, GEN_FRACT3_COMMA_PLUS1, "fractional seconds (+0100)");
+ checkGeneralized(d3, GEN_FRACT4_ZULU, "fractional seconds (Zulu)");
+ checkGeneralized(d3, GEN_FRACT4_PLUS1, "fractional seconds (+0100)");
+ checkGeneralized(d3, GEN_FRACT4_COMMA_PLUS1, "fractional seconds (+0100)");
}
-
}
diff --git a/jdk/test/sun/text/resources/LocaleData.cldr b/jdk/test/sun/text/resources/LocaleData.cldr
index fbc696101d8..4b348430e19 100644
--- a/jdk/test/sun/text/resources/LocaleData.cldr
+++ b/jdk/test/sun/text/resources/LocaleData.cldr
@@ -8274,3 +8274,29 @@ FormatData/fi/DatePatterns/3=d.M.y
# bug #8075173
FormatData/de/standalone.MonthAbbreviations/2=M\u00e4r
+
+# bug #8178872
+FormatData/pt_PT/latn.NumberElements/0=,
+FormatData/pt_PT/latn.NumberElements/1=\u00a0
+FormatData/pt_AO/latn.NumberElements/0=,
+FormatData/pt_AO/latn.NumberElements/1=\u00a0
+FormatData/pt_CH/latn.NumberElements/0=,
+FormatData/pt_CH/latn.NumberElements/1=\u00a0
+FormatData/pt_CV/latn.NumberElements/0=,
+FormatData/pt_CV/latn.NumberElements/1=\u00a0
+FormatData/pt_GQ/latn.NumberElements/0=,
+FormatData/pt_GQ/latn.NumberElements/1=\u00a0
+FormatData/pt_MO/latn.NumberElements/0=,
+FormatData/pt_MO/latn.NumberElements/1=\u00a0
+FormatData/pt_LU/latn.NumberElements/0=,
+FormatData/pt_LU/latn.NumberElements/1=\u00a0
+FormatData/pt_MZ/latn.NumberElements/0=,
+FormatData/pt_MZ/latn.NumberElements/1=\u00a0
+FormatData/pt_ST/latn.NumberElements/0=,
+FormatData/pt_ST/latn.NumberElements/1=\u00a0
+FormatData/pt_TL/latn.NumberElements/0=,
+FormatData/pt_TL/latn.NumberElements/1=\u00a0
+FormatData/kea/latn.NumberElements/0=,
+FormatData/kea/latn.NumberElements/1=\u00a0
+FormatData/kea_CV/latn.NumberElements/0=,
+FormatData/kea_CV/latn.NumberElements/1=\u00a0
diff --git a/jdk/test/sun/text/resources/LocaleDataTest.java b/jdk/test/sun/text/resources/LocaleDataTest.java
index 690d9a2509b..3c900e318f8 100644
--- a/jdk/test/sun/text/resources/LocaleDataTest.java
+++ b/jdk/test/sun/text/resources/LocaleDataTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -37,7 +37,7 @@
* 7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
* 7114053 7074882 7040556 8008577 8013836 8021121 6192407 6931564 8027695
* 8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
- * 8145136 8145952 8164784 8037111 8081643 7037368
+ * 8145136 8145952 8164784 8037111 8081643 7037368 8178872
* @summary Verify locale data
* @modules java.base/sun.util.resources
* @modules jdk.localedata
@@ -99,8 +99,15 @@
* LocaleNames/fr_FR/US=\u00c9tats-Unis
* LocaleNames/fr_FR/FR=France
*
- * You can use language tag with '-' in locale field like this:
- * LocaleNames/sr-Latn/SR=Surinam
+ * Second field which designates locale is in the form of:
+ * 1) Legacy locale notation using '_' as a locale component(language/country/variant) separator.
+ * language is a mandatory component. country and variant are optional, however,
+ * variant cannot exist without country. So for example, while "ja"/"ja_JP"/"ja_JP_JP" are valid,
+ * "_JP"/"ja__JP" are invalid.
+ *
+ * 2) BCP47 language tag notation in which we can specify language tag with '-' as a subtag
+ * separator. Language tag can be specified with '-' in locale field like this:
+ * LocaleNames/sr-Latn/SR=Surinam
* FormatData/sr-Latn-BA/DayNames/2=utorak
*
* The command-line syntax of this test is
@@ -276,16 +283,25 @@ public class LocaleDataTest
throw new Exception("Malformed input file: \"" + key + "\" is missing locale name");
localeName = key.substring(oldIndex, index);
boolean use_tag = localeName.indexOf("-") != -1;
-
if (use_tag == false && localeName.length() > 0) {
- language = localeName.substring(0, 2);
- if (localeName.length() > 3) {
- country = localeName.substring(3, 5);
- if (localeName.length() > 5)
- variant = localeName.substring(6);
+ String[] locDetails = localeName.split("_");
+ switch (locDetails.length) {
+ case 1:
+ language = locDetails[0];
+ break;
+ case 2:
+ language = locDetails[0];
+ country = locDetails[1];
+ break;
+ case 3:
+ language = locDetails[0];
+ country = locDetails[1];
+ variant = locDetails[2];
+ break;
+ default:
+ throw new Exception("locale not specified properly " + locDetails);
}
}
-
oldIndex = index + 1;
index = key.indexOf("/", oldIndex);
if (index == -1)
diff --git a/jdk/test/tools/jar/InputFilesTest.java b/jdk/test/tools/jar/InputFilesTest.java
index e853dafa03a..3dc08293a76 100644
--- a/jdk/test/tools/jar/InputFilesTest.java
+++ b/jdk/test/tools/jar/InputFilesTest.java
@@ -30,6 +30,8 @@
* demonstrating identical behavior to JDK 8 jar tool.
* @library /test/lib
* @modules jdk.jartool
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run testng InputFilesTest
*/
diff --git a/jdk/test/tools/jar/ReleaseBeforeFiles.java b/jdk/test/tools/jar/ReleaseBeforeFiles.java
index 8272eb44273..4aaa8df7aa4 100644
--- a/jdk/test/tools/jar/ReleaseBeforeFiles.java
+++ b/jdk/test/tools/jar/ReleaseBeforeFiles.java
@@ -29,6 +29,8 @@
* not the --release option is preceded by a file name.
* @library /test/lib
* @modules jdk.jartool/sun.tools.jar
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run testng ReleaseBeforeFiles
*/
diff --git a/jdk/test/tools/jar/compat/CLICompatibility.java b/jdk/test/tools/jar/compat/CLICompatibility.java
index 21cf815a573..e32287d5690 100644
--- a/jdk/test/tools/jar/compat/CLICompatibility.java
+++ b/jdk/test/tools/jar/compat/CLICompatibility.java
@@ -50,7 +50,9 @@ import static org.testng.Assert.assertTrue;
* @test
* @bug 8170952
* @library /lib/testlibrary /test/lib
- * @build jdk.testlibrary.JDKToolFinder
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * jdk.testlibrary.JDKToolFinder
* @run testng CLICompatibility
* @summary Basic test for compatibility of CLI options
*/
diff --git a/jdk/test/tools/jar/mmrjar/Basic.java b/jdk/test/tools/jar/mmrjar/Basic.java
index 7a9cdaa46c7..22a7a927357 100644
--- a/jdk/test/tools/jar/mmrjar/Basic.java
+++ b/jdk/test/tools/jar/mmrjar/Basic.java
@@ -30,6 +30,8 @@
* jdk.compiler
* jdk.jartool
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run testng Basic
*/
diff --git a/jdk/test/tools/jar/modularJar/Basic.java b/jdk/test/tools/jar/modularJar/Basic.java
index 9b81495a0f1..183afdeb787 100644
--- a/jdk/test/tools/jar/modularJar/Basic.java
+++ b/jdk/test/tools/jar/modularJar/Basic.java
@@ -50,7 +50,9 @@ import static java.lang.System.out;
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler
* jdk.jartool
- * @build jdk.testlibrary.JDKToolFinder
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
+ * jdk.testlibrary.JDKToolFinder
* @compile Basic.java
* @run testng Basic
* @summary Tests for plain Modular jars & Multi-Release Modular jars
diff --git a/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java b/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java
index f08422061f1..6f17f895dab 100644
--- a/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java
+++ b/jdk/test/tools/jar/multiRelease/ApiValidatorTest.java
@@ -28,7 +28,14 @@
* @modules java.base/jdk.internal.misc
* jdk.compiler
* jdk.jartool
- * @build MRTestBase
+ * @build jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * MRTestBase
* @run testng/timeout=1200 ApiValidatorTest
*/
diff --git a/jdk/test/tools/jar/multiRelease/Basic.java b/jdk/test/tools/jar/multiRelease/Basic.java
index 37f50d2403b..d46ee791f4f 100644
--- a/jdk/test/tools/jar/multiRelease/Basic.java
+++ b/jdk/test/tools/jar/multiRelease/Basic.java
@@ -27,7 +27,14 @@
* @modules java.base/jdk.internal.misc
* jdk.compiler
* jdk.jartool
- * @build MRTestBase
+ * @build jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * MRTestBase
* @run testng Basic
*/
diff --git a/jdk/test/tools/jar/multiRelease/Basic1.java b/jdk/test/tools/jar/multiRelease/Basic1.java
index e01ce8fe2f8..9f86eb029cd 100644
--- a/jdk/test/tools/jar/multiRelease/Basic1.java
+++ b/jdk/test/tools/jar/multiRelease/Basic1.java
@@ -27,8 +27,13 @@
* @modules java.base/jdk.internal.misc
* jdk.compiler
* jdk.jartool
- * @build jdk.test.lib.JDKToolFinder jdk.test.lib.Utils
- * @build MRTestBase
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
+ * MRTestBase
* @run testng Basic1
*/
diff --git a/jdk/test/tools/jar/multiRelease/RuntimeTest.java b/jdk/test/tools/jar/multiRelease/RuntimeTest.java
index 7de864c26a9..e739dccabf4 100644
--- a/jdk/test/tools/jar/multiRelease/RuntimeTest.java
+++ b/jdk/test/tools/jar/multiRelease/RuntimeTest.java
@@ -26,6 +26,13 @@
* @summary Test Multi-Release jar usage in runtime
* @library /test/lib
* @modules jdk.compiler
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng RuntimeTest
*/
diff --git a/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java b/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java
index a61f592f55d..1841fed5181 100644
--- a/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java
+++ b/jdk/test/tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java
@@ -29,9 +29,14 @@
* @library /test/lib
* @modules java.base/jdk.internal.jimage
* java.base/jdk.internal.module
- * @build jdk.test.lib.process.*
+ * @build jdk.test.lib.Utils
+ * jdk.test.lib.Asserts
+ * jdk.test.lib.JDKToolFinder
+ * jdk.test.lib.JDKToolLauncher
+ * jdk.test.lib.Platform
+ * jdk.test.lib.process.*
* @run testng JLinkMultiReleaseJarTest
-*/
+ */
import java.io.ByteArrayInputStream;
import java.io.IOException;
diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java
index 15babb5ad33..ca0584f2b93 100644
--- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java
+++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/CompiledVersionTest.java
@@ -42,8 +42,10 @@ import static org.testng.Assert.*;
* @test
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler jdk.jlink
- * @build CompiledVersionTest jdk.testlibrary.ProcessTools
- * jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
+ * CompiledVersionTest jdk.testlibrary.ProcessTools
* @run testng CompiledVersionTest
*/
diff --git a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java
index 6c849f37785..827b88be58e 100644
--- a/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java
+++ b/jdk/test/tools/jlink/plugins/SystemModuleDescriptors/UserModuleTest.java
@@ -48,8 +48,10 @@ import static org.testng.Assert.*;
* @modules jdk.compiler jdk.jlink
* @modules java.base/jdk.internal.module
* @modules java.base/jdk.internal.org.objectweb.asm
- * @build ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
- * jdk.test.lib.compiler.CompilerUtils
+ * @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
+ * ModuleTargetHelper UserModuleTest jdk.testlibrary.ProcessTools
* @run testng UserModuleTest
*/
diff --git a/jdk/test/tools/jmod/JmodNegativeTest.java b/jdk/test/tools/jmod/JmodNegativeTest.java
index 3bc2359c2cd..30205067b0e 100644
--- a/jdk/test/tools/jmod/JmodNegativeTest.java
+++ b/jdk/test/tools/jmod/JmodNegativeTest.java
@@ -27,6 +27,8 @@
* @modules jdk.compiler
* jdk.jlink
* @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
* @run testng JmodNegativeTest
* @summary Negative tests for jmod
*/
diff --git a/jdk/test/tools/jmod/JmodTest.java b/jdk/test/tools/jmod/JmodTest.java
index ffd3a903a49..d6a80deaec7 100644
--- a/jdk/test/tools/jmod/JmodTest.java
+++ b/jdk/test/tools/jmod/JmodTest.java
@@ -29,6 +29,8 @@
* @modules jdk.compiler
* jdk.jlink
* @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
* @run testng/othervm -Djava.io.tmpdir=. JmodTest
*/
diff --git a/jdk/test/tools/jmod/hashes/HashesTest.java b/jdk/test/tools/jmod/hashes/HashesTest.java
index e71efe91bc5..867927685d4 100644
--- a/jdk/test/tools/jmod/hashes/HashesTest.java
+++ b/jdk/test/tools/jmod/hashes/HashesTest.java
@@ -31,6 +31,8 @@
* jdk.compiler
* jdk.jartool
* jdk.jlink
+ * @build jdk.test.lib.compiler.ModuleInfoMaker
+ * jdk.test.lib.compiler.CompilerUtils
* @run testng HashesTest
*/
diff --git a/jdk/test/tools/launcher/LauncherMessageTest.java b/jdk/test/tools/launcher/LauncherMessageTest.java
index 6643f122ea1..ff1ee640bf8 100644
--- a/jdk/test/tools/launcher/LauncherMessageTest.java
+++ b/jdk/test/tools/launcher/LauncherMessageTest.java
@@ -25,6 +25,8 @@
* @test
* @bug 8167063
* @library /test/lib
+ * @build jdk.test.lib.Platform
+ * jdk.test.lib.util.FileUtils
* @run main LauncherMessageTest
* @summary LauncherHelper should not throw JNI error for LinkageError
*/
diff --git a/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java b/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java
index 66c4930c0ca..716e0bf0ec0 100644
--- a/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java
+++ b/jdk/test/tools/launcher/modules/addexports/AddExportsTestWarningError.java
@@ -27,7 +27,9 @@
* @summary Basic argument validation for --add-exports
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler
- * @build jdk.testlibrary.*
+ * @build jdk.test.lib.compiler.ModuleInfoMaker
+ * jdk.test.lib.compiler.CompilerUtils
+ * jdk.testlibrary.*
* @run testng AddExportsTestWarningError
*/
diff --git a/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java b/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java
index 079acccf400..d1c69378acf 100644
--- a/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java
+++ b/jdk/test/tools/launcher/modules/addreads/AddReadsTestWarningError.java
@@ -27,8 +27,10 @@
* @summary Basic argument validation for --add-reads
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler
- * @build AddReadsTestWarningError
+ * @build jdk.test.lib.compiler.ModuleInfoMaker
+ * @build jdk.test.lib.compiler.CompilerUtils
* @build jdk.testlibrary.*
+ * @build AddReadsTestWarningError
* @run testng AddReadsTestWarningError
*/
diff --git a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java
index aad3bd8d40b..29acb1f77a4 100644
--- a/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java
+++ b/jdk/test/tools/launcher/modules/patch/systemmodules/PatchSystemModules.java
@@ -28,6 +28,8 @@
* @library /lib/testlibrary /test/lib
* @modules jdk.compiler
* @build jdk.test.lib.compiler.CompilerUtils
+ * jdk.test.lib.util.FileUtils
+ * jdk.test.lib.Platform
* @run testng PatchSystemModules
*/
diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
index 76bdf22b950..090434a1607 100644
--- a/make/CompileJavaModules.gmk
+++ b/make/CompileJavaModules.gmk
@@ -42,8 +42,7 @@ java.activation_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
################################################################################
-java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline \
- --doclint-format html4
+java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
java.base_COPY := .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
java.base_CLEAN := intrinsic.properties
diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java
index 26bbf1bae94..75720134be6 100644
--- a/test/lib/jdk/test/lib/Platform.java
+++ b/test/lib/jdk/test/lib/Platform.java
@@ -23,6 +23,10 @@
package jdk.test.lib;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.regex.Pattern;
public class Platform {
@@ -228,7 +232,7 @@ public class Platform {
public static boolean canPtraceAttachLinux() throws Exception {
// SELinux deny_ptrace:
- String deny_ptrace = Utils.fileAsString("/sys/fs/selinux/booleans/deny_ptrace");
+ String deny_ptrace = fileAsString("/sys/fs/selinux/booleans/deny_ptrace");
if (deny_ptrace != null && deny_ptrace.contains("1")) {
// ptrace will be denied:
return false;
@@ -239,7 +243,7 @@ public class Platform {
// 1 - restricted ptrace: a process must be a children of the inferior or user is root
// 2 - only processes with CAP_SYS_PTRACE may use ptrace or user is root
// 3 - no attach: no processes may use ptrace with PTRACE_ATTACH
- String ptrace_scope = Utils.fileAsString("/proc/sys/kernel/yama/ptrace_scope");
+ String ptrace_scope = fileAsString("/proc/sys/kernel/yama/ptrace_scope");
if (ptrace_scope != null) {
if (ptrace_scope.startsWith("3")) {
return false;
@@ -265,4 +269,10 @@ public class Platform {
.matcher(osArch)
.matches();
}
+
+ private static String fileAsString(String filename) throws IOException {
+ Path filePath = Paths.get(filename);
+ if (!Files.exists(filePath)) return null;
+ return new String(Files.readAllBytes(filePath));
+ }
}
|
|---|