diff --git a/make/common/Release.gmk b/make/common/Release.gmk index ce2dda53d1d9c86e3b6e8ec51e939898a66f02da..b584781eb50355746ef7476b6a714f469d2ff8ac 100644 --- a/make/common/Release.gmk +++ b/make/common/Release.gmk @@ -252,7 +252,7 @@ images:: sanity-images post-sanity-images \ $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \ trim-image-jre trim-image-jdk \ identify-image-jre identify-image-jdk \ - process-image-jre process-image-jdk sec-files sec-files-win jgss-files + process-image-jre process-image-jdk sec-files sec-files-win jgss-files endif # Don't use these @@ -400,7 +400,8 @@ TOOLS = \ # classes that go into jfr.jar JFR_CLASSES_DIRS= \ com/oracle/jrockit/jfr \ - oracle/jrockit/jfr + oracle/jrockit/jfr \ + jdk/jfr # classes that go into jsse.jar JSSE_CLASSES_DIRS = \ @@ -612,6 +613,7 @@ ifndef JAVASE_EMBEDDED $(ECHO) "oracle/jrockit/jfr/parser/" >> $@ $(ECHO) "oracle/jrockit/jfr/settings/" >> $@ $(ECHO) "oracle/jrockit/jfr/tools/" >> $@ + $(ECHO) "jdk/jfr/" >> $@ endif endif diff --git a/makefiles/CreateJars.gmk b/makefiles/CreateJars.gmk index 64c96b2c97e00bfe6c86a89cb23b90d8069a295e..54531f19ef5a7f86c1338df08700a82eb872e589 100644 --- a/makefiles/CreateJars.gmk +++ b/makefiles/CreateJars.gmk @@ -132,7 +132,7 @@ $(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR,,\ ########################################################################################## # Full JRE exclude list for rt.jar and resources.jar -# This value should exclude types destined for jars other than rt.jar and resources.jar. +# This value should exclude types destined for jars other than rt.jar and resources.jar. # When building a Profile this value augments the profile specific exclusions RT_JAR_EXCLUDES += \ com/oracle/security \ @@ -246,7 +246,8 @@ RT_JAR_EXCLUDES += \ sun/util/resources/cldr \ $(LOCALEDATA_INCLUDES) \ com/oracle/jrockit/jfr \ - oracle/jrockit/jfr + oracle/jrockit/jfr \ + jdk/jfr ifeq ($(OPENJDK_TARGET_OS), macosx) RT_JAR_EXCLUDES += com/sun/nio/sctp \ @@ -337,7 +338,7 @@ $(PROFILE_VERSION_CLASS_TARGETS) : $(PROFILE_VERSION_JAVA_TARGETS) # Support for removing the addPropertyChangeListener and removePropertyChangeListener -# methods from classes that only go into the profile builds. +# methods from classes that only go into the profile builds. BEANLESS_CLASSES = $(IMAGES_OUTPUTDIR)/beanless # When there are $ characters in filenames we have some very subtle interactions between @@ -352,7 +353,7 @@ CLASSES_TO_DEBEAN = \ java/util/jar/Pack200\$$Packer.class \ java/util/jar/Pack200\$$Unpacker.class \ com/sun/java/util/jar/pack/PackerImpl.class \ - com/sun/java/util/jar/pack/UnpackerImpl.class + com/sun/java/util/jar/pack/UnpackerImpl.class ifneq ($(PROFILE),) BEANLESS_CLASSES_TARGETS := $(addprefix $(BEANLESS_CLASSES)/, $(CLASSES_TO_DEBEAN)) @@ -428,7 +429,8 @@ ifeq ($(ENABLE_JFR), true) SRCS:=$(JDK_OUTPUTDIR)/classes,\ SUFFIXES:=.class .jfc .xsd,\ INCLUDES:=com/oracle/jrockit/jfr \ - oracle/jrockit/jfr,\ + oracle/jrockit/jfr \ + jdk/jfr,\ JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\ SKIP_METAINF:=true,\ MANIFEST:=$(MAINMANIFEST), \ @@ -468,14 +470,14 @@ $(JCE_MANIFEST): $(MAINMANIFEST) $(MV) $@.tmp $@ ########################################################################################## -# For security and crypto jars, always build the jar, but for closed, install the prebuilt -# signed version instead of the newly built jar. Unsigned jars are treated as intermediate -# targets and explicitly added to the JARS list. For open, signing is not needed. See +# For security and crypto jars, always build the jar, but for closed, install the prebuilt +# signed version instead of the newly built jar. Unsigned jars are treated as intermediate +# targets and explicitly added to the JARS list. For open, signing is not needed. See # SignJars.gmk for more information. # # The source for the crypto jars is not available for all licensees. The BUILD_CRYPTO # variable is set to no if these jars can't be built to skip that step of the build. -# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no +# Note that for OPENJDK, the build will fail if BUILD_CRYPTO=no since then there is no # other way to get the jars than to build them. SUNPKCS11_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/sunpkcs11.jar @@ -738,7 +740,7 @@ $(UCRYPTO_JAR_DST) : $(UCRYPTO_JAR_SRC) @$(ECHO) $(LOG_INFO) "\n>>>Installing prebuilt OracleUcrypto provider..." $(install-file) -JARS += $(UCRYPTO_JAR_UNSIGNED) +JARS += $(UCRYPTO_JAR_UNSIGNED) endif endif diff --git a/src/share/classes/java/nio/Buffer.java b/src/share/classes/java/nio/Buffer.java index 068444a975842dedfe120af02da1bd1cb50e90c9..f5a9cd4f6754332969b73ded55201e0636a8d319 100644 --- a/src/share/classes/java/nio/Buffer.java +++ b/src/share/classes/java/nio/Buffer.java @@ -52,7 +52,7 @@ import java.util.Spliterator; *

There is one subclass of this class for each non-boolean primitive type. * * - *

Transferring data

+ *

Transferring data

* *

Each subclass of this class defines two categories of get and * put operations:

@@ -78,7 +78,7 @@ import java.util.Spliterator; * current position. * * - *

Marking and resetting

+ *

Marking and resetting

* *

A buffer's mark is the index to which its position will be reset * when the {@link #reset reset} method is invoked. The mark is not always @@ -89,7 +89,7 @@ import java.util.Spliterator; * {@link InvalidMarkException} to be thrown. * * - *

Invariants

+ *

Invariants

* *

The following invariant holds for the mark, position, limit, and * capacity values: @@ -109,7 +109,7 @@ import java.util.Spliterator; * to zero. * * - *

Clearing, flipping, and rewinding

+ *

Clearing, flipping, and rewinding

* *

In addition to methods for accessing the position, limit, and capacity * values and for marking and resetting, this class also defines the following @@ -132,7 +132,7 @@ import java.util.Spliterator; * * * - *

Read-only buffers

+ *

Read-only buffers

* *

Every buffer is readable, but not every buffer is writable. The * mutation methods of each buffer class are specified as optional @@ -143,14 +143,14 @@ import java.util.Spliterator; * {@link #isReadOnly isReadOnly} method. * * - *

Thread safety

+ *

Thread safety

* *

Buffers are not safe for use by multiple concurrent threads. If a * buffer is to be used by more than one thread then access to the buffer * should be controlled by appropriate synchronization. * * - *

Invocation chaining

+ *

Invocation chaining

* *

Methods in this class that do not otherwise have a value to return are * specified to return the buffer upon which they are invoked. This allows diff --git a/src/share/classes/java/nio/MappedByteBuffer.java b/src/share/classes/java/nio/MappedByteBuffer.java index 1d26276f10c344322684b9698a5282b0bd1037b2..25aa60e0b104663068f24bc8f0c7d401ab56aea0 100644 --- a/src/share/classes/java/nio/MappedByteBuffer.java +++ b/src/share/classes/java/nio/MappedByteBuffer.java @@ -45,7 +45,7 @@ import sun.misc.Unsafe; * this program or another. Whether or not such changes occur, and when they * occur, is operating-system dependent and therefore unspecified. * - *

All or part of a mapped byte buffer may become + *

All or part of a mapped byte buffer may become * inaccessible at any time, for example if the mapped file is truncated. An * attempt to access an inaccessible region of a mapped byte buffer will not * change the buffer's content and will cause an unspecified exception to be diff --git a/src/share/classes/java/nio/X-Buffer.java.template b/src/share/classes/java/nio/X-Buffer.java.template index c3037adb4d29973f883bc33904138f6b7ad7ffd8..03a7255c16a477dbf52044cf6e41391456b4bc17 100644 --- a/src/share/classes/java/nio/X-Buffer.java.template +++ b/src/share/classes/java/nio/X-Buffer.java.template @@ -44,23 +44,23 @@ import java.util.stream.$Streamtype$Stream; * *

* *

$Type$ buffers can be created either by {@link #allocate - * allocation}, which allocates space for the buffer's + * allocation}, which allocates space for the buffer's * #if[byte] * - * content, or by {@link #wrap($type$[]) wrapping} an + * content, or by {@link #wrap($type$[]) wrapping} an * existing $type$ array {#if[char]?or string} into a buffer. * #else[byte] * - * content, by {@link #wrap($type$[]) wrapping} an existing + * content, by {@link #wrap($type$[]) wrapping} an existing * $type$ array {#if[char]?or string} into a buffer, or by creating a * view of an existing byte buffer. * @@ -94,8 +94,8 @@ import java.util.stream.$Streamtype$Stream; * #if[byte] * - * - *

Direct vs. non-direct buffers

+ * + *

Direct vs. non-direct buffers

* *

A byte buffer is either direct or non-direct. Given a * direct byte buffer, the Java virtual machine will make a best effort to @@ -116,7 +116,7 @@ import java.util.stream.$Streamtype$Stream; * buffers only when they yield a measureable gain in program performance. * *

A direct byte buffer may also be created by {@link - * java.nio.channels.FileChannel#map mapping} a region of a file + * java.nio.channels.FileChannel#map mapping} a region of a file * directly into memory. An implementation of the Java platform may optionally * support the creation of direct byte buffers from native code via JNI. If an * instance of one of these kinds of buffers refers to an inaccessible region @@ -129,8 +129,8 @@ import java.util.stream.$Streamtype$Stream; * that explicit buffer management can be done in performance-critical code. * * - * - *

Access to binary data

+ * + *

Access to binary data

* *

This class defines methods for reading and writing values of all other * primitive types, except boolean. Primitive values are translated @@ -156,7 +156,7 @@ import java.util.stream.$Streamtype$Stream; * parameters of the absolute get and put methods are in terms of * bytes rather than of the type being read or written. * - * + * * *

For access to homogeneous binary data, that is, sequences of values of * the same type, this class defines methods that can create views of a @@ -214,7 +214,7 @@ import java.util.stream.$Streamtype$Stream; #end[char] * #if[byte] - *

Invocation chaining

+ *

Invocation chaining

#end[byte] * *

Methods in this class that do not otherwise have a value to return are @@ -297,7 +297,7 @@ public abstract class $Type$Buffer *

The new buffer's position will be zero, its limit will be its * capacity, its mark will be undefined, and each of its elements will be * initialized to zero. Whether or not it has a - * {@link #hasArray backing array} is unspecified. + * {@link #hasArray backing array} is unspecified. * * @param capacity * The new buffer's capacity, in $type$s @@ -318,9 +318,8 @@ public abstract class $Type$Buffer * *

The new buffer's position will be zero, its limit will be its * capacity, its mark will be undefined, and each of its elements will be - * initialized to zero. It will have a {@link #array - * backing array}, and its {@link #arrayOffset array - * offset} will be zero. + * initialized to zero. It will have a {@link #array backing array}, + * and its {@link #arrayOffset array offset} will be zero. * * @param capacity * The new buffer's capacity, in $type$s @@ -344,8 +343,8 @@ public abstract class $Type$Buffer * and vice versa. The new buffer's capacity will be * array.length, its position will be offset, its limit * will be offset + length, and its mark will be undefined. Its - * {@link #array backing array} will be the given array, and - * its {@link #arrayOffset array offset} will be zero.

+ * {@link #array backing array} will be the given array, and + * its {@link #arrayOffset array offset} will be zero.

* * @param array * The array that will back the new buffer @@ -384,8 +383,8 @@ public abstract class $Type$Buffer * that is, modifications to the buffer will cause the array to be modified * and vice versa. The new buffer's capacity and limit will be * array.length, its position will be zero, and its mark will be - * undefined. Its {@link #array
backing array} will be the - * given array, and its {@link #arrayOffset array offset} will + * undefined. Its {@link #array backing array} will be the + * given array, and its {@link #arrayOffset array offset>} will * be zero.

* * @param array @@ -703,6 +702,9 @@ public abstract class $Type$Buffer *
      *     src.get(a, 0, a.length) 
* + * @param dst + * The destination array + * * @return This buffer * * @throws BufferUnderflowException @@ -842,6 +844,9 @@ public abstract class $Type$Buffer *
      *     dst.put(a, 0, a.length) 
* + * @param src + * The source array + * * @return This buffer * * @throws BufferOverflowException @@ -930,6 +935,9 @@ public abstract class $Type$Buffer *
      *     dst.put(s, 0, s.length()) 
* + * @param src + * The source string + * * @return This buffer * * @throws BufferOverflowException @@ -1419,7 +1427,7 @@ public abstract class $Type$Buffer * *

The byte order of $a$ $type$ buffer created by allocation or by * wrapping an existing $type$ array is the {@link - * ByteOrder#nativeOrder native order} of the underlying + * ByteOrder#nativeOrder native order} of the underlying * hardware. The byte order of $a$ $type$ buffer created as a view of a byte buffer is that of the * byte buffer at the moment that the view is created.

diff --git a/src/share/classes/java/nio/channels/AsynchronousByteChannel.java b/src/share/classes/java/nio/channels/AsynchronousByteChannel.java index 9fdf7530d16aed6f412898b6c4b7ac6d20d3c1c5..47ffc87a80b6ad856c62e91aa03f5bd5cf18b62b 100644 --- a/src/share/classes/java/nio/channels/AsynchronousByteChannel.java +++ b/src/share/classes/java/nio/channels/AsynchronousByteChannel.java @@ -87,6 +87,8 @@ public interface AsynchronousByteChannel * initiates a read operation before a previous read operation has * completed then a {@link ReadPendingException} will be thrown. * + * @param + * The type of the attachment * @param dst * The buffer into which bytes are to be transferred * @param attachment @@ -166,6 +168,8 @@ public interface AsynchronousByteChannel * initiates a write operation before a previous write operation has * completed then a {@link WritePendingException} will be thrown. * + * @param + * The type of the attachment * @param src * The buffer from which bytes are to be retrieved * @param attachment diff --git a/src/share/classes/java/nio/channels/AsynchronousChannel.java b/src/share/classes/java/nio/channels/AsynchronousChannel.java index 5aa9fe23b3840ec1a4c6244efa96abc7c5429614..98e30d05e79b6082aa46852b747454f81ddd16ad 100644 --- a/src/share/classes/java/nio/channels/AsynchronousChannel.java +++ b/src/share/classes/java/nio/channels/AsynchronousChannel.java @@ -61,7 +61,7 @@ import java.util.concurrent.Future; // javadoc * may not allow more than one read and one write operation to be outstanding at * any given time. * - *

Cancellation

+ *

Cancellation

* *

The {@code Future} interface defines the {@link Future#cancel cancel} * method to cancel execution. This causes all threads waiting on the result of diff --git a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java index 2eb4b5219d20137b8356f0be6c9f5f80c62cdbeb..ace607323cbc2e65d688cd4e2a22d5b8fc4c26e1 100644 --- a/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java +++ b/src/share/classes/java/nio/channels/AsynchronousChannelGroup.java @@ -60,7 +60,7 @@ import java.util.concurrent.TimeUnit; * default group is not configured then the pooled threads of the default group * are {@link Thread#isDaemon daemon} threads. * - * + *
* * * @@ -89,7 +89,7 @@ import java.util.concurrent.TimeUnit; * *
System propertyDescription
* - *

Threading

+ *

Threading

* *

The completion handler for an I/O operation initiated on a channel bound * to a group is guaranteed to be invoked by one of the pooled threads in the @@ -104,7 +104,7 @@ import java.util.concurrent.TimeUnit; * handler directly by the initiating thread (see {@link * AsynchronousServerSocketChannel#accept(Object,CompletionHandler) accept}). * - *

Shutdown and Termination

+ *

Shutdown and Termination

* *

The {@link #shutdown() shutdown} method is used to initiate an orderly * shutdown of a group. An orderly shutdown marks the group as shutdown; diff --git a/src/share/classes/java/nio/channels/AsynchronousFileChannel.java b/src/share/classes/java/nio/channels/AsynchronousFileChannel.java index b1c6e788c5020230dae5f866eb8c151bb6293469..c40fb3762878ad1daeb3bcffa7f2a37a60cee2f8 100644 --- a/src/share/classes/java/nio/channels/AsynchronousFileChannel.java +++ b/src/share/classes/java/nio/channels/AsynchronousFileChannel.java @@ -425,6 +425,8 @@ public abstract class AsynchronousFileChannel * They are not suitable for controlling access to a file by multiple * threads within the same virtual machine. * + * @param + * The type of the attachment * @param position * The position at which the locked region is to start; must be * non-negative @@ -473,6 +475,8 @@ public abstract class AsynchronousFileChannel * ch.{@link #lock(long,long,boolean,Object,CompletionHandler) lock}(0L, Long.MAX_VALUE, false, att, handler) * * + * @param + * The type of the attachment * @param attachment * The object to attach to the I/O operation; can be {@code null} * @param handler @@ -652,6 +656,8 @@ public abstract class AsynchronousFileChannel * If the given file position is greater than the file's size at the time * that the read is attempted then no bytes are read. * + * @param + * The type of the attachment * @param dst * The buffer into which bytes are to be transferred * @param position @@ -716,6 +722,8 @@ public abstract class AsynchronousFileChannel * bytes; the values of any bytes between the previous end-of-file and the * newly-written bytes are unspecified. * + * @param + * The type of the attachment * @param src * The buffer from which bytes are to be transferred * @param position diff --git a/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java b/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java index 477855572b5872e937445f152b22f90fffa5bf89..75882008bd1eb6ebb4687b8d7b77c3293b764ab6 100644 --- a/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java +++ b/src/share/classes/java/nio/channels/AsynchronousServerSocketChannel.java @@ -52,7 +52,7 @@ import java.io.IOException; *

Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Channels of this type support the following options: *

- * + *
* * * @@ -98,6 +98,9 @@ public abstract class AsynchronousServerSocketChannel /** * Initializes a new instance of this class. + * + * @param provider + * The provider that created this channel */ protected AsynchronousServerSocketChannel(AsynchronousChannelProvider provider) { this.provider = provider; @@ -105,6 +108,8 @@ public abstract class AsynchronousServerSocketChannel /** * Returns the provider that created this channel. + * + * @return The provider that created this channel */ public final AsynchronousChannelProvider provider() { return provider; @@ -263,6 +268,8 @@ public abstract class AsynchronousServerSocketChannel * the connection is closed and the operation completes with a {@link * SecurityException}. * + * @param + * The type of the attachment * @param attachment * The object to attach to the I/O operation; can be {@code null} * @param handler diff --git a/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java b/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java index 74c93c872afc9aff5ad0c2b4686a8e1163935b15..2c2a1a306d5bf5fab5a4c4d52ba970d3dea43256 100644 --- a/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java +++ b/src/share/classes/java/nio/channels/AsynchronousSocketChannel.java @@ -62,7 +62,7 @@ import java.nio.ByteBuffer; *

Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Asynchronous socket channels support the following options: *

- *
Option NameDescription
+ *
* * * @@ -91,7 +91,7 @@ import java.nio.ByteBuffer; * * Additional (implementation specific) options may also be supported. * - *

Timeouts

+ *

Timeouts

* *

The {@link #read(ByteBuffer,long,TimeUnit,Object,CompletionHandler) read} * and {@link #write(ByteBuffer,long,TimeUnit,Object,CompletionHandler) write} @@ -123,6 +123,9 @@ public abstract class AsynchronousSocketChannel /** * Initializes a new instance of this class. + * + * @param provider + * The provider that created this channel */ protected AsynchronousSocketChannel(AsynchronousChannelProvider provider) { this.provider = provider; @@ -130,6 +133,8 @@ public abstract class AsynchronousSocketChannel /** * Returns the provider that created this channel. + * + * @return The provider that created this channel */ public final AsynchronousChannelProvider provider() { return provider; @@ -287,6 +292,8 @@ public abstract class AsynchronousSocketChannel * java.lang.SecurityManager#checkConnect checkConnect} method permits * connecting to the address and port number of the given remote endpoint. * + * @param + * The type of the attachment * @param remote * The remote address to which this channel is to be connected * @param attachment @@ -365,6 +372,8 @@ public abstract class AsynchronousSocketChannel * AsynchronousByteChannel#read(ByteBuffer,Object,CompletionHandler)} * method. * + * @param + * The type of the attachment * @param dst * The buffer into which bytes are to be transferred * @param timeout @@ -461,6 +470,8 @@ public abstract class AsynchronousSocketChannel * read from the channel will cause an unspecific runtime exception to be * thrown. * + * @param + * The type of the attachment * @param dsts * The buffers into which bytes are to be transferred * @param offset @@ -520,6 +531,8 @@ public abstract class AsynchronousSocketChannel * AsynchronousByteChannel#write(ByteBuffer,Object,CompletionHandler)} * method. * + * @param + * The type of the attachment * @param src * The buffer from which bytes are to be retrieved * @param timeout @@ -610,6 +623,8 @@ public abstract class AsynchronousSocketChannel * to write to the channel will cause an unspecific runtime exception to be * thrown. * + * @param + * The type of the attachment * @param srcs * The buffers from which bytes are to be retrieved * @param offset diff --git a/src/share/classes/java/nio/channels/DatagramChannel.java b/src/share/classes/java/nio/channels/DatagramChannel.java index fd8b920eebdbbc7ee9f3929ba7d725a7d4d3bd98..3626317a9821837cdf1b66db33bf980d983332c5 100644 --- a/src/share/classes/java/nio/channels/DatagramChannel.java +++ b/src/share/classes/java/nio/channels/DatagramChannel.java @@ -57,7 +57,7 @@ import java.nio.channels.spi.SelectorProvider; * setOption} method. A datagram channel to an Internet Protocol socket supports * the following options: *

- *
Option NameDescription
+ *
* * * @@ -117,6 +117,9 @@ public abstract class DatagramChannel /** * Initializes a new instance of this class. + * + * @param provider + * The provider that created this channel */ protected DatagramChannel(SelectorProvider provider) { super(provider); diff --git a/src/share/classes/java/nio/channels/FileChannel.java b/src/share/classes/java/nio/channels/FileChannel.java index 02d9082d2309c1cba86d7f71ecf0304a937acc93..57ce3e10d9ea8970e5040a4d3ad19bd7f3d88167 100644 --- a/src/share/classes/java/nio/channels/FileChannel.java +++ b/src/share/classes/java/nio/channels/FileChannel.java @@ -46,7 +46,7 @@ import java.util.Collections; * of bytes that can be read and written and whose current {@link #size * size} can be queried. The size of the file increases * when bytes are written beyond its current size; the size of the file - * decreases when it is {@link #truncate truncated}. The + * decreases when it is {@link #truncate truncated}. The * file may also have some associated metadata such as access * permissions, content type, and last-modification time; this class does not * define methods for metadata access. @@ -830,7 +830,7 @@ public abstract class FileChannel *

A region of a file may be mapped into memory in one of three modes: *

* - *
    + *
      * *
    • Read-only: Any attempt to modify the resulting buffer * will cause a {@link java.nio.ReadOnlyBufferException} to be thrown. diff --git a/src/share/classes/java/nio/channels/FileLock.java b/src/share/classes/java/nio/channels/FileLock.java index e978af431792c14e16d765f93d2a1668dd492c3c..fb584ee163e35af63dff430adede8d7525fe4454 100644 --- a/src/share/classes/java/nio/channels/FileLock.java +++ b/src/share/classes/java/nio/channels/FileLock.java @@ -72,7 +72,7 @@ import java.io.IOException; *

      File-lock objects are safe for use by multiple concurrent threads. * * - *

      Platform dependencies

      + *

      Platform dependencies

      * *

      This file-locking API is intended to map directly to the native locking * facility of the underlying operating system. Thus the locks held on a file @@ -261,6 +261,11 @@ public abstract class FileLock implements AutoCloseable { /** * Tells whether or not this lock overlaps the given lock range. * + * @param position + * The starting position of the lock range + * @param size + * The size of the lock range + * * @return true if, and only if, this lock and the given lock * range overlap by at least one byte */ diff --git a/src/share/classes/java/nio/channels/MulticastChannel.java b/src/share/classes/java/nio/channels/MulticastChannel.java index 0e06633b51fd57729d4742638b7a2f7d5d10e143..ca17e2415ceffe25b98dbef7f99c392413c86f27 100644 --- a/src/share/classes/java/nio/channels/MulticastChannel.java +++ b/src/share/classes/java/nio/channels/MulticastChannel.java @@ -71,7 +71,7 @@ import java.net.StandardSocketOptions; // javadoc * MembershipKey#drop drop} method drops membership so that datagrams from the * source address can no longer be received. * - *

      Platform dependencies

      + *

      Platform dependencies

      * * The multicast implementation is intended to map directly to the native * multicasting facility. Consequently, the following items should be considered diff --git a/src/share/classes/java/nio/channels/NetworkChannel.java b/src/share/classes/java/nio/channels/NetworkChannel.java index 3900f9d284b19eac10c4fe653ac9b97678eb443a..b56b5e25cce24e073d3da25ada374b337ca7295b 100644 --- a/src/share/classes/java/nio/channels/NetworkChannel.java +++ b/src/share/classes/java/nio/channels/NetworkChannel.java @@ -106,6 +106,8 @@ public interface NetworkChannel /** * Sets the value of a socket option. * + * @param + * The type of the socket option value * @param name * The socket option * @param value @@ -130,6 +132,8 @@ public interface NetworkChannel /** * Returns the value of a socket option. * + * @param + * The type of the socket option value * @param name * The socket option * diff --git a/src/share/classes/java/nio/channels/Pipe.java b/src/share/classes/java/nio/channels/Pipe.java index af0722e99abd4affa434f959d7c0578de0d92c53..4b5a5a51ca71ee5fc21dd7ac7bf2846c613807f3 100644 --- a/src/share/classes/java/nio/channels/Pipe.java +++ b/src/share/classes/java/nio/channels/Pipe.java @@ -33,10 +33,9 @@ import java.nio.channels.spi.*; * A pair of channels that implements a unidirectional pipe. * *

      A pipe consists of a pair of channels: A writable {@link - * Pipe.SinkChannel sink} channel and a readable {@link - * Pipe.SourceChannel source} channel. Once some bytes are - * written to the sink channel they can be read from source channel in exactly - * the order in which they were written. + * Pipe.SinkChannel sink} channel and a readable {@link Pipe.SourceChannel source} + * channel. Once some bytes are written to the sink channel they can be read + * from source channel in exactlyAthe order in which they were written. * *

      Whether or not a thread writing bytes to a pipe will block until another * thread reads those bytes, or some previously-written bytes, from the pipe is @@ -63,6 +62,9 @@ public abstract class Pipe { { /** * Constructs a new instance of this class. + * + * @param provider + * The selector provider */ protected SourceChannel(SelectorProvider provider) { super(provider); @@ -94,6 +96,9 @@ public abstract class Pipe { { /** * Initializes a new instance of this class. + * + * @param provider + * The selector provider */ protected SinkChannel(SelectorProvider provider) { super(provider); diff --git a/src/share/classes/java/nio/channels/SelectableChannel.java b/src/share/classes/java/nio/channels/SelectableChannel.java index 7041c34e188f196bb6fce2fcfa9369e5a662f1b1..17f86831d6dd42c8b7b8f902934ce8dee7bcb85f 100644 --- a/src/share/classes/java/nio/channels/SelectableChannel.java +++ b/src/share/classes/java/nio/channels/SelectableChannel.java @@ -64,8 +64,8 @@ import java.nio.channels.spi.SelectorProvider; * threads.

      * * - * - *

      Blocking mode

      + *
      + *

      Blocking mode

      * * A selectable channel is either in blocking mode or in * non-blocking mode. In blocking mode, every I/O operation invoked @@ -142,6 +142,9 @@ public abstract class SelectableChannel * Retrieves the key representing the channel's registration with the given * selector. * + * @param sel + * The selector + * * @return The key returned when this channel was last registered with the * given selector, or null if this channel is not * currently registered with that selector diff --git a/src/share/classes/java/nio/channels/SelectionKey.java b/src/share/classes/java/nio/channels/SelectionKey.java index 7a0ab88ac3e1f41238254df5890fcc782db79915..e140ee61952d1fb31ce8449dc29f33232c3400b9 100644 --- a/src/share/classes/java/nio/channels/SelectionKey.java +++ b/src/share/classes/java/nio/channels/SelectionKey.java @@ -42,7 +42,7 @@ import java.io.IOException; * next selection operation. The validity of a key may be tested by invoking * its {@link #isValid isValid} method. * - * + * * *

      A selection key contains two operation sets represented as * integer values. Each bit of an operation set denotes a category of diff --git a/src/share/classes/java/nio/channels/Selector.java b/src/share/classes/java/nio/channels/Selector.java index d4c200e694283de36b779850b3e19151f84d4414..3f21727f220cc426423e5e99ba396f94f76ab254 100644 --- a/src/share/classes/java/nio/channels/Selector.java +++ b/src/share/classes/java/nio/channels/Selector.java @@ -36,13 +36,13 @@ import java.util.Set; * *

      A selector may be created by invoking the {@link #open open} method of * this class, which will use the system's default {@link - * java.nio.channels.spi.SelectorProvider selector provider} to + * java.nio.channels.spi.SelectorProvider selector provider} to * create a new selector. A selector may also be created by invoking the * {@link java.nio.channels.spi.SelectorProvider#openSelector openSelector} * method of a custom selector provider. A selector remains open until it is * closed via its {@link #close close} method. * - * + * * *

      A selectable channel's registration with a selector is represented by a * {@link SelectionKey} object. A selector maintains three sets of selection @@ -80,18 +80,18 @@ import java.util.Set; * during the next selection operation, at which time the key will removed from * all of the selector's key sets. * - *

      Keys are added to the selected-key set by selection + *

      Keys are added to the selected-key set by selection * operations. A key may be removed directly from the selected-key set by * invoking the set's {@link java.util.Set#remove(java.lang.Object) remove} * method or by invoking the {@link java.util.Iterator#remove() remove} method - * of an {@link java.util.Iterator iterator} obtained from the + * of an {@link java.util.Iterator iterator} obtained from the * set. Keys are never removed from the selected-key set in any other way; * they are not, in particular, removed as a side effect of selection * operations. Keys may not be added directly to the selected-key set.

      * * - * - *

      Selection

      + *
      + *

      Selection

      * *

      During each selection operation, keys may be added to and removed from a * selector's selected-key set and may be removed from its key and @@ -111,7 +111,7 @@ import java.util.Set; * operation began. For a channel that is ready for at least one such * operation, one of the following two actions is performed:

      * - *
        + *
          * *
        1. If the channel's key is not already in the selected-key set then * it is added to that set and its ready-operation set is modified to @@ -126,7 +126,7 @@ import java.util.Set; * words, the ready set returned by the underlying system is * bitwise-disjoined into the key's current ready set.

        2. * - *
        + *
      * * If all of the keys in the key set at the start of this step have empty * interest sets then neither the selected-key set nor any of the keys' @@ -142,7 +142,7 @@ import java.util.Set; * difference between the three selection methods.

      * * - *

      Concurrency

      + *

      Concurrency

      * *

      Selectors are themselves safe for use by multiple concurrent threads; * their key sets, however, are not. @@ -183,7 +183,7 @@ import java.util.Set; *

      The {@link #close close} method synchronizes on the selector and all * three key sets in the same order as in a selection operation. * - * + * * *

      A selector's key and selected-key sets are not, in general, safe for use * by multiple concurrent threads. If such a thread might modify one of these diff --git a/src/share/classes/java/nio/channels/ServerSocketChannel.java b/src/share/classes/java/nio/channels/ServerSocketChannel.java index 90e39b529a4dece30e03f51d1ac4be8c2ffe6380..aeda90df0319e3ca0c53721c09a6078c6474aa57 100644 --- a/src/share/classes/java/nio/channels/ServerSocketChannel.java +++ b/src/share/classes/java/nio/channels/ServerSocketChannel.java @@ -46,7 +46,7 @@ import java.nio.channels.spi.SelectorProvider; *

      Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Server-socket channels support the following options: *

      - *
Option NameDescription
+ *
* * * @@ -78,6 +78,9 @@ public abstract class ServerSocketChannel /** * Initializes a new instance of this class. + * + * @param provider + * The provider that created this channel */ protected ServerSocketChannel(SelectorProvider provider) { super(provider); diff --git a/src/share/classes/java/nio/channels/SocketChannel.java b/src/share/classes/java/nio/channels/SocketChannel.java index 6203326490492f2f5db2516631e25c0638c1133e..091570cbf6424ab31464e1dd77a86d9ac56ebcf4 100644 --- a/src/share/classes/java/nio/channels/SocketChannel.java +++ b/src/share/classes/java/nio/channels/SocketChannel.java @@ -66,7 +66,7 @@ import java.nio.channels.spi.SelectorProvider; *

Socket options are configured using the {@link #setOption(SocketOption,Object) * setOption} method. Socket channels support the following options: *

- *
Option NameDescription
+ *
* * * @@ -120,6 +120,9 @@ public abstract class SocketChannel /** * Initializes a new instance of this class. + * + * @param provider + * The provider that created this channel */ protected SocketChannel(SelectorProvider provider) { super(provider); @@ -153,6 +156,8 @@ public abstract class SocketChannel * @param remote * The remote address to which the new channel is to be connected * + * @return A new, and connected, socket channel + * * @throws AsynchronousCloseException * If another thread closes this channel * while the connect operation is in progress diff --git a/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java b/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java index a5936832b7a3de05d84dd2865b05dba96c1e53ee..c8400692ee98bc3d628b813d7a57bc37d3b62313 100644 --- a/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java +++ b/src/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java @@ -46,7 +46,7 @@ import sun.nio.ch.Interruptible; * before and after, respectively, invoking an I/O operation that might block * indefinitely. In order to ensure that the {@link #end end} method is always * invoked, these methods should be used within a - * try ... finally block: + * try ... finally block: * *
  * boolean completed = false;
diff --git a/src/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java b/src/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java
index e674d501718b7850d17427722e320b3ccf966178..5d1b1ee99a14f8e2a971a95d7b43815249a59bec 100644
--- a/src/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java
+++ b/src/share/classes/java/nio/channels/spi/AbstractSelectableChannel.java
@@ -72,6 +72,9 @@ public abstract class AbstractSelectableChannel
 
     /**
      * Initializes a new instance of this class.
+     *
+     * @param  provider
+     *         The provider that created this channel
      */
     protected AbstractSelectableChannel(SelectorProvider provider) {
         this.provider = provider;
@@ -251,6 +254,9 @@ public abstract class AbstractSelectableChannel
      * that is blocked in an I/O operation upon this channel to return
      * immediately, either by throwing an exception or by returning normally.
      * 

+ * + * @throws IOException + * If an I/O error occurs */ protected abstract void implCloseSelectableChannel() throws IOException; @@ -299,6 +305,10 @@ public abstract class AbstractSelectableChannel * changing the blocking mode. This method is only invoked if the new mode * is different from the current mode.

* + * @param block If true then this channel will be placed in + * blocking mode; if false then it will be placed + * non-blocking mode + * * @throws IOException * If an I/O error occurs */ diff --git a/src/share/classes/java/nio/channels/spi/AbstractSelector.java b/src/share/classes/java/nio/channels/spi/AbstractSelector.java index fea4b0972e93a024d6122adc8277513758f6fad1..f4f4a2a74de644cfa12bd564c54d1f21e86dc6c4 100644 --- a/src/share/classes/java/nio/channels/spi/AbstractSelector.java +++ b/src/share/classes/java/nio/channels/spi/AbstractSelector.java @@ -43,7 +43,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * after, respectively, invoking an I/O operation that might block * indefinitely. In order to ensure that the {@link #end end} method is always * invoked, these methods should be used within a - * try ... finally block:
+ * try ... finally block: * *
  * try {
@@ -77,6 +77,9 @@ public abstract class AbstractSelector
 
     /**
      * Initializes a new instance of this class.
+     *
+     * @param  provider
+     *         The provider that created this selector
      */
     protected AbstractSelector(SelectorProvider provider) {
         this.provider = provider;
diff --git a/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java b/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java
index 827a2c5b981aece330c262f2537ec22827e702bb..e768e475c351f3a7705a8ceea92482a7c2f0a59c 100644
--- a/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java
+++ b/src/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java
@@ -174,6 +174,8 @@ public abstract class AsynchronousChannelProvider {
      * @param   threadFactory
      *          The factory to use when creating new threads
      *
+     * @return  A new asynchronous channel group
+     *
      * @throws  IllegalArgumentException
      *          If {@code nThreads <= 0}
      * @throws  IOException
@@ -193,6 +195,8 @@ public abstract class AsynchronousChannelProvider {
      *          A value {@code >=0} or a negative value for implementation
      *          specific default
      *
+     * @return  A new asynchronous channel group
+     *
      * @throws  IOException
      *          If an I/O error occurs
      *
diff --git a/src/share/classes/java/nio/channels/spi/SelectorProvider.java b/src/share/classes/java/nio/channels/spi/SelectorProvider.java
index 62d4bf6ffc0df58f96de7929369b4b245e2f75ed..8d74b43cf64d25f341bbc894ea0a50dd3adfd754 100644
--- a/src/share/classes/java/nio/channels/spi/SelectorProvider.java
+++ b/src/share/classes/java/nio/channels/spi/SelectorProvider.java
@@ -183,6 +183,9 @@ public abstract class SelectorProvider {
      * Opens a datagram channel.
      *
      * @return  The new channel
+     *
+     * @throws  IOException
+     *          If an I/O error occurs
      */
     public abstract DatagramChannel openDatagramChannel()
         throws IOException;
@@ -209,6 +212,9 @@ public abstract class SelectorProvider {
      * Opens a pipe.
      *
      * @return  The new pipe
+     *
+     * @throws  IOException
+     *          If an I/O error occurs
      */
     public abstract Pipe openPipe()
         throws IOException;
@@ -217,6 +223,9 @@ public abstract class SelectorProvider {
      * Opens a selector.
      *
      * @return  The new selector
+     *
+     * @throws  IOException
+     *          If an I/O error occurs
      */
     public abstract AbstractSelector openSelector()
         throws IOException;
@@ -225,6 +234,9 @@ public abstract class SelectorProvider {
      * Opens a server-socket channel.
      *
      * @return  The new channel
+     *
+     * @throws  IOException
+     *          If an I/O error occurs
      */
     public abstract ServerSocketChannel openServerSocketChannel()
         throws IOException;
@@ -233,6 +245,9 @@ public abstract class SelectorProvider {
      * Opens a socket channel.
      *
      * @return  The new channel
+     *
+     * @throws  IOException
+     *          If an I/O error occurs
      */
     public abstract SocketChannel openSocketChannel()
         throws IOException;
diff --git a/src/share/classes/java/nio/charset/Charset-X-Coder.java.template b/src/share/classes/java/nio/charset/Charset-X-Coder.java.template
index 34be4eb83754c72da839e41f726d4d8b87e5a3c0..335194eef5257cc92ee8758197f80fb088a21a83 100644
--- a/src/share/classes/java/nio/charset/Charset-X-Coder.java.template
+++ b/src/share/classes/java/nio/charset/Charset-X-Coder.java.template
@@ -163,6 +163,9 @@ public abstract class Charset$Coder$ {
      * Initializes a new $coder$.  The new $coder$ will have the given
      * $otypes-per-itype$ and replacement values.
      *
+     * @param  cs
+     *         The charset that created this $coder$
+     *
      * @param  average$ItypesPerOtype$
      *         A positive float value indicating the expected number of
      *         $otype$s that will be produced for each input $itype$
@@ -209,6 +212,9 @@ public abstract class Charset$Coder$ {
      * $otypes-per-itype$ values and its replacement will be the
      * $replTypeName$ $defaultReplName$.
      *
+     * @param  cs
+     *         The charset that created this $coder$
+     *
      * @param  average$ItypesPerOtype$
      *         A positive float value indicating the expected number of
      *         $otype$s that will be produced for each input $itype$
@@ -386,6 +392,8 @@ public abstract class Charset$Coder$ {
      * 

The default implementation of this method does nothing. This method * should be overridden by $coder$s that require notification of changes to * the malformed-input action.

+ * + * @param newAction The new action */ protected void implOnMalformedInput(CodingErrorAction newAction) { } @@ -428,6 +436,8 @@ public abstract class Charset$Coder$ { *

The default implementation of this method does nothing. This method * should be overridden by $coder$s that require notification of changes to * the unmappable-character action.

+ * + * @param newAction The new action */ protected void implOnUnmappableCharacter(CodingErrorAction newAction) { } @@ -925,6 +935,9 @@ public abstract class Charset$Coder$ { *

The default implementation of this method is not very efficient; it * should generally be overridden to improve performance.

* + * @param c + * The given character + * * @return true if, and only if, this encoder can encode * the given character * @@ -953,6 +966,9 @@ public abstract class Charset$Coder$ { *

The default implementation of this method is not very efficient; it * should generally be overridden to improve performance.

* + * @param cs + * The given character sequence + * * @return true if, and only if, this encoder can encode * the given character without throwing any exceptions and without * performing any replacements diff --git a/src/share/classes/java/nio/charset/Charset.java b/src/share/classes/java/nio/charset/Charset.java index 69c3ab0e19fecc314508a8fd12d053178e0fe741..278bacb17c501ebf617f99586f44add7b3459ef6 100644 --- a/src/share/classes/java/nio/charset/Charset.java +++ b/src/share/classes/java/nio/charset/Charset.java @@ -66,7 +66,7 @@ import sun.security.action.GetPropertyAction; * * *
- *

Charset names

+ *

Charset names

* *

Charsets are named by strings composed of the following characters: * @@ -140,7 +140,7 @@ import sun.security.action.GetPropertyAction; * previous canonical name be made into an alias. * * - *

Standard charsets

+ *

Standard charsets

* *
* @@ -217,7 +217,7 @@ import sun.security.action.GetPropertyAction; *

The {@link StandardCharsets} class defines constants for each of the * standard charsets. * - *

Terminology

+ *

Terminology

* *

The name of this class is taken from the terms used in * RFC 2278. @@ -737,6 +737,9 @@ public abstract class Charset * it is not necessarily the case that the given charset is not contained * in this charset. * + * @param cs + * The given charset + * * @return true if the given charset is contained in this charset */ public abstract boolean contains(Charset cs); diff --git a/src/share/classes/java/nio/charset/CoderResult.java b/src/share/classes/java/nio/charset/CoderResult.java index 5b2c4d41f89fc283f22a1398c6120c9f5fcbf1c2..15aad362c06c54a259f93b9cedae7e63c0c85337 100644 --- a/src/share/classes/java/nio/charset/CoderResult.java +++ b/src/share/classes/java/nio/charset/CoderResult.java @@ -227,6 +227,9 @@ public class CoderResult { * Static factory method that returns the unique object describing a * malformed-input error of the given length. * + * @param length + * The given length + * * @return The requested coder-result object */ public static CoderResult malformedForLength(int length) { @@ -243,6 +246,9 @@ public class CoderResult { * Static factory method that returns the unique result object describing * an unmappable-character error of the given length. * + * @param length + * The given length + * * @return The requested coder-result object */ public static CoderResult unmappableForLength(int length) { diff --git a/src/share/classes/java/nio/charset/spi/CharsetProvider.java b/src/share/classes/java/nio/charset/spi/CharsetProvider.java index 3525e201d8757d485bc132b9ce46f148cf34ecd4..1e31d75fe310269e611f90ac8fa512eb70b7e314 100644 --- a/src/share/classes/java/nio/charset/spi/CharsetProvider.java +++ b/src/share/classes/java/nio/charset/spi/CharsetProvider.java @@ -39,8 +39,8 @@ import java.util.Iterator; * the usual extension directories. Providers may also be made available by * adding them to the applet or application class path or by some other * platform-specific means. Charset providers are looked up via the current - * thread's {@link java.lang.Thread#getContextClassLoader() context - * class loader}. + * thread's {@link java.lang.Thread#getContextClassLoader() context class + * loader}. * *

A charset provider identifies itself with a provider-configuration file * named java.nio.charset.spi.CharsetProvider in the resource diff --git a/src/share/classes/java/nio/file/FileStore.java b/src/share/classes/java/nio/file/FileStore.java index 831dba8a5e961d1002679e342e6a0fe6dd1f6c2b..d0bdc013992e7ee7d8d7de2e9483293dd76f4004 100644 --- a/src/share/classes/java/nio/file/FileStore.java +++ b/src/share/classes/java/nio/file/FileStore.java @@ -173,6 +173,8 @@ public abstract class FileStore { * The {@code type} parameter is the type of the attribute view required and * the method returns an instance of that type if supported. * + * @param + * The {@code FileStoreAttributeView} type * @param type * the {@code Class} object corresponding to the attribute view * diff --git a/src/share/classes/java/nio/file/FileSystem.java b/src/share/classes/java/nio/file/FileSystem.java index e2166079831cdaa3c549e8258134bc7db8bedcbc..2296cada82959cdffecfc6a705a162b31707bbb1 100644 --- a/src/share/classes/java/nio/file/FileSystem.java +++ b/src/share/classes/java/nio/file/FileSystem.java @@ -315,7 +315,7 @@ public abstract class FileSystem * that resembles regular expressions but with a simpler syntax. For example: * *

- *
Option NameDescription
+ *
* * * diff --git a/src/share/classes/java/nio/file/FileSystems.java b/src/share/classes/java/nio/file/FileSystems.java index ef443640af016a33b283cc0d5636ef9ce9e89fca..d6b4496dda7b8aac10c4451b970e4048d69c1592 100644 --- a/src/share/classes/java/nio/file/FileSystems.java +++ b/src/share/classes/java/nio/file/FileSystems.java @@ -200,6 +200,10 @@ public final class FileSystems { * existing file system. In the case of the {@link FileSystems#getDefault * default} file system, no permission check is required. * + * @param uri the URI to locate the file system + * + * @return the reference to the file system + * * @throws IllegalArgumentException * if the pre-conditions for the {@code uri} parameter are not met * @throws FileSystemNotFoundException diff --git a/src/share/classes/java/nio/file/Files.java b/src/share/classes/java/nio/file/Files.java index c4065690aa5e34c771d2859243be5f2ac8973762..ca0263d0660b2ff4a332ca073b55f5aacc8821e4 100644 --- a/src/share/classes/java/nio/file/Files.java +++ b/src/share/classes/java/nio/file/Files.java @@ -194,7 +194,7 @@ public final class Files { *

In the addition to {@code READ} and {@code WRITE}, the following * options may be present: * - *

{@code *.java}Matches a path that represents a file name ending in {@code .java}
+ *
* * * @@ -1616,7 +1616,8 @@ public final class Files { * } * * - * + * @param + * The {@code FileAttributeView} type * @param path * the path to the file * @param type @@ -1665,6 +1666,8 @@ public final class Files { * PosixFileAttributes attrs = Files.readAttributes(path, PosixFileAttributes.class, NOFOLLOW_LINKS); * * + * @param + * The {@code BasicFileAttributes} type * @param path * the path to the file * @param type @@ -1863,7 +1866,7 @@ public final class Files { * attributes} parameter: * *
- *
Option Description
{@link StandardOpenOption#APPEND APPEND}
+ *
* * * @@ -1971,10 +1974,12 @@ public final class Files { * System Interface (POSIX) family of standards. * * @param path - * A file reference that locates the file + * The path to the file * @param perms * The new set of permissions * + * @return The path + * * @throws UnsupportedOperationException * if the associated file system does not support the {@code * PosixFileAttributeView} @@ -2009,7 +2014,7 @@ public final class Files { * access to a file attribute that is the owner of the file. * * @param path - * A file reference that locates the file + * The path to the file * @param options * options indicating how symbolic links are handled * @@ -2052,10 +2057,12 @@ public final class Files { * * * @param path - * A file reference that locates the file + * The path to the file * @param owner * The new file owner * + * @return The path + * * @throws UnsupportedOperationException * if the associated file system does not support the {@code * FileOwnerAttributeView} @@ -2090,6 +2097,8 @@ public final class Files { * readAttributes} method and the file type tested with the {@link * BasicFileAttributes#isSymbolicLink} method. * + * @param path The path to the file + * * @return {@code true} if the file is a symbolic link; {@code false} if * the file does not exist, is not a symbolic link, or it cannot * be determined if the file is a symbolic link or not. @@ -2239,7 +2248,7 @@ public final class Files { * @param time * the new last modified time * - * @return the file + * @return the path * * @throws IOException * if an I/O error occurs diff --git a/src/share/classes/java/nio/file/Path.java b/src/share/classes/java/nio/file/Path.java index 577827658549c1b926978547c26554061bb5a80e..39afd4d4255f5bfa402cc54593674e308b50fbaf 100644 --- a/src/share/classes/java/nio/file/Path.java +++ b/src/share/classes/java/nio/file/Path.java @@ -64,7 +64,7 @@ import java.util.Iterator; * those developing custom file system implementations. Methods may be added to * this interface in future releases.

* - *

Accessing Files

+ *

Accessing Files

*

Paths may be used with the {@link Files} class to operate on files, * directories, and other types of files. For example, suppose we want a {@link * java.io.BufferedReader} to read text from a file "{@code access.log}". The @@ -75,7 +75,7 @@ import java.util.Iterator; * BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8); * * - *

Interoperability

+ *

Interoperability

*

Paths associated with the default {@link * java.nio.file.spi.FileSystemProvider provider} are generally interoperable * with the {@link java.io.File java.io.File} class. Paths created by other @@ -87,7 +87,7 @@ import java.util.Iterator; * addition, the {@link #toFile toFile} method is useful to construct a {@code * File} from the {@code String} representation of a {@code Path}. * - *

Concurrency

+ *

Concurrency

*

Implementations of this interface are immutable and safe for use by * multiple concurrent threads. * diff --git a/src/share/classes/java/nio/file/SecureDirectoryStream.java b/src/share/classes/java/nio/file/SecureDirectoryStream.java index 6ef4882eae8a66d7fc5602bdef3b7dab5d8cde3a..2bfa2056b82c00f0168e805bbd1ff18492c19808 100644 --- a/src/share/classes/java/nio/file/SecureDirectoryStream.java +++ b/src/share/classes/java/nio/file/SecureDirectoryStream.java @@ -122,6 +122,8 @@ public interface SecureDirectoryStream * an optional list of attributes to set atomically when creating * the file * + * @return the seekable byte channel + * * @throws ClosedDirectoryStreamException * if the directory stream is closed * @throws IllegalArgumentException @@ -260,6 +262,8 @@ public interface SecureDirectoryStream * then all methods to read or update attributes will throw {@link * ClosedDirectoryStreamException ClosedDirectoryStreamException}. * + * @param + * The {@code FileAttributeView} type * @param type * the {@code Class} object corresponding to the file attribute view * @@ -288,6 +292,8 @@ public interface SecureDirectoryStream * is created but methods to read or update attributes of the file will * fail when invoked and the file does not exist. * + * @param + * The {@code FileAttributeView} type * @param path * the path of the file * @param type diff --git a/src/share/classes/java/nio/file/WatchEvent.java b/src/share/classes/java/nio/file/WatchEvent.java index cab199f0b572ead46b84d895dcafe9f1c789a4b8..508486851509008861de54c32b515648222c9758 100644 --- a/src/share/classes/java/nio/file/WatchEvent.java +++ b/src/share/classes/java/nio/file/WatchEvent.java @@ -55,11 +55,16 @@ public interface WatchEvent { public static interface Kind { /** * Returns the name of the event kind. + * + * @return the name of the event kind */ String name(); /** * Returns the type of the {@link WatchEvent#context context} value. + * + * + * @return the type of the context value */ Class type(); } @@ -76,6 +81,8 @@ public interface WatchEvent { public static interface Modifier { /** * Returns the name of the modifier. + * + * @return the name of the modifier */ String name(); } diff --git a/src/share/classes/java/nio/file/WatchService.java b/src/share/classes/java/nio/file/WatchService.java index 5a63fcd872227a5e127c3c45fde69f20c6d2aaff..c6440b208e474b960779b0a26424da0d0f8ccda6 100644 --- a/src/share/classes/java/nio/file/WatchService.java +++ b/src/share/classes/java/nio/file/WatchService.java @@ -78,7 +78,7 @@ import java.util.concurrent.TimeUnit; * The {@link java.nio.channels.FileChannel FileChannel} class defines methods * to lock regions of a file against access by other programs. * - *

Platform dependencies

+ *

Platform dependencies

* *

The implementation that observes events from the file system is intended * to map directly on to the native file event notification facility where diff --git a/src/share/classes/java/nio/file/attribute/AclEntry.java b/src/share/classes/java/nio/file/attribute/AclEntry.java index 9b4ef8a34c3cc4859b119d1e2d7d326360254085..49bf52924715ccc30112f1fcecf368837c6f0626 100644 --- a/src/share/classes/java/nio/file/attribute/AclEntry.java +++ b/src/share/classes/java/nio/file/attribute/AclEntry.java @@ -134,6 +134,7 @@ public final class AclEntry { /** * Sets the type component of this builder. * + * @param type the component type * @return this builder */ public Builder setType(AclEntryType type) { @@ -146,6 +147,7 @@ public final class AclEntry { /** * Sets the principal component of this builder. * + * @param who the principal component * @return this builder */ public Builder setPrincipal(UserPrincipal who) { @@ -168,6 +170,7 @@ public final class AclEntry { * Sets the permissions component of this builder. On return, the * permissions component of this builder is a copy of the given set. * + * @param perms the permissions component * @return this builder * * @throws ClassCastException @@ -193,6 +196,7 @@ public final class AclEntry { * permissions component of this builder is a copy of the permissions in * the given array. * + * @param perms the permissions component * @return this builder */ public Builder setPermissions(AclEntryPermission... perms) { @@ -211,6 +215,7 @@ public final class AclEntry { * Sets the flags component of this builder. On return, the flags * component of this builder is a copy of the given set. * + * @param flags the flags component * @return this builder * * @throws ClassCastException @@ -236,6 +241,7 @@ public final class AclEntry { * component of this builder is a copy of the flags in the given * array. * + * @param flags the flags component * @return this builder */ public Builder setFlags(AclEntryFlag... flags) { @@ -267,9 +273,7 @@ public final class AclEntry { /** * Constructs a new builder with the components of an existing ACL entry. * - * @param entry - * an ACL entry - * + * @param entry an ACL entry * @return a new builder */ public static Builder newBuilder(AclEntry entry) { @@ -278,6 +282,8 @@ public final class AclEntry { /** * Returns the ACL entry type. + * + * @return the ACL entry type */ public AclEntryType type() { return type; @@ -285,6 +291,8 @@ public final class AclEntry { /** * Returns the principal component. + * + * @return the principal component */ public UserPrincipal principal() { return who; @@ -294,6 +302,8 @@ public final class AclEntry { * Returns a copy of the permissions component. * *

The returned set is a modifiable copy of the permissions. + * + * @return the permissions component */ public Set permissions() { return new HashSet(perms); @@ -303,6 +313,8 @@ public final class AclEntry { * Returns a copy of the flags component. * *

The returned set is a modifiable copy of the flags. + * + * @return the flags component */ public Set flags() { return new HashSet(flags); diff --git a/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java b/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java index 2f94937b6c114b9d0fbc55ccf8faee36683342cc..f5d58d41f4a964eba5794f6a3912aa542900c1cd 100644 --- a/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java +++ b/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java @@ -54,7 +54,7 @@ import java.io.IOException; * supportsFileAttributeView} method can be used to test if a file system * supports ACLs. * - *

Interoperability

+ *

Interoperability

* * RFC 3530 allows for special user identities to be used on platforms that * support the POSIX defined access permissions. The special user identities @@ -65,7 +65,7 @@ import java.io.IOException; * UserPrincipalLookupService} may be used to obtain a {@link UserPrincipal} * to represent these special identities by invoking the {@link * UserPrincipalLookupService#lookupPrincipalByName lookupPrincipalByName} - * method.

+ * method. * *

Usage Example: * Suppose we wish to add an entry to an existing ACL to grant "joe" access: @@ -90,11 +90,11 @@ import java.io.IOException; * view.setAcl(acl); * * - *

Dynamic Access

+ *

Dynamic Access

*

Where dynamic access to file attributes is required, the attributes * supported by this attribute view are as follows: *

- *
{@code "*"} Read all {@link BasicFileAttributes basic-file-attributes}.
+ *
* * * @@ -118,7 +118,7 @@ import java.io.IOException; * update the ACL or owner attributes as if by invoking the {@link #setAcl setAcl} * or {@link #setOwner setOwner} methods. * - *

Setting the ACL when creating a file

+ *

Setting the ACL when creating a file

* *

Implementations supporting this attribute view may also support setting * the initial ACL when creating a file or directory. The initial ACL diff --git a/src/share/classes/java/nio/file/attribute/AttributeView.java b/src/share/classes/java/nio/file/attribute/AttributeView.java index 0b2951b960e270209cd384f0b51b4ba3eb9c8a36..d33f9764a79abaaab23deb06537a1f0a3c500354 100644 --- a/src/share/classes/java/nio/file/attribute/AttributeView.java +++ b/src/share/classes/java/nio/file/attribute/AttributeView.java @@ -38,6 +38,8 @@ package java.nio.file.attribute; public interface AttributeView { /** * Returns the name of the attribute view. + * + * @return the name of the attribute view */ String name(); } diff --git a/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java b/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java index 2a8e2c9585bfaebbe6fb37c9a43a39be313c04e5..3a9c7916969802c41fc5040e9f70bd2a2a3d7fe6 100644 --- a/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java +++ b/src/share/classes/java/nio/file/attribute/BasicFileAttributeView.java @@ -41,7 +41,7 @@ import java.io.IOException; *

Where dynamic access to file attributes is required, the attributes * supported by this attribute view have the following names and types: *

- *
Name Type
+ *
* * * diff --git a/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java b/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java index d1f715dcea267014a5c572f320b8d9048c48df6b..df2d10bb27cd312d98d421363b5ebd6c2ae87f65 100644 --- a/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java +++ b/src/share/classes/java/nio/file/attribute/BasicFileAttributes.java @@ -87,22 +87,31 @@ public interface BasicFileAttributes { /** * Tells whether the file is a regular file with opaque content. + * + * @return {@code true} if the file is a regular file with opaque content */ boolean isRegularFile(); /** * Tells whether the file is a directory. + * + * @return {@code true} if the file is a directory */ boolean isDirectory(); /** * Tells whether the file is a symbolic link. + * + * @return {@code true} if the file is a symbolic link */ boolean isSymbolicLink(); /** * Tells whether the file is something other than a regular file, directory, * or symbolic link. + * + * @return {@code true} if the file something other than a regular file, + * directory or symbolic link */ boolean isOther(); @@ -138,6 +147,8 @@ public interface BasicFileAttributes { * and two files are the {@link java.nio.file.Files#isSameFile same} with * non-{@code null} file keys, then their file keys are equal. * + * @return an object that uniquely identifies the given file, or {@code null} + * * @see java.nio.file.Files#walkFileTree */ Object fileKey(); diff --git a/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java b/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java index aa99d23322ee67b47a86736d32c15a8ef30a60ef..1fb53853a618dc743d8a99eb70c7315a58fc1165 100644 --- a/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java +++ b/src/share/classes/java/nio/file/attribute/DosFileAttributeView.java @@ -41,7 +41,7 @@ import java.io.IOException; * BasicFileAttributeView}, and in addition, the following attributes are * supported: *
- *
Name Type
+ *
* * * diff --git a/src/share/classes/java/nio/file/attribute/FileAttribute.java b/src/share/classes/java/nio/file/attribute/FileAttribute.java index d3704cbf8212217f6ec639e0efeb0ea2e2cb41cf..461687634872693da7b5864b11d7ea136cc23a11 100644 --- a/src/share/classes/java/nio/file/attribute/FileAttribute.java +++ b/src/share/classes/java/nio/file/attribute/FileAttribute.java @@ -40,11 +40,15 @@ package java.nio.file.attribute; public interface FileAttribute { /** * Returns the attribute name. + * + * @return The attribute name */ String name(); /** * Returns the attribute value. + * + * @return The attribute value */ T value(); } diff --git a/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java b/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java index ea5f1e2eaa64531ddb3df66eb2799827c1df0520..81a6a4156e7ffc8f118bd2e1fdac47614531e35e 100644 --- a/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java +++ b/src/share/classes/java/nio/file/attribute/PosixFileAttributeView.java @@ -68,13 +68,13 @@ import java.io.IOException; * PosixFilePermissions.toString(attrs.permissions())); * * - *

Dynamic Access

+ *

Dynamic Access

*

Where dynamic access to file attributes is required, the attributes * supported by this attribute view are as defined by {@link * BasicFileAttributeView} and {@link FileOwnerAttributeView}, and in addition, * the following attributes are supported: *

- *
Name Type
+ *
* * * @@ -102,7 +102,7 @@ import java.io.IOException; * #setPermissions setPermissions}, {@link #setOwner setOwner}, and {@link * #setGroup setGroup} methods respectively. * - *

Setting Initial Permissions

+ *

Setting Initial Permissions

*

Implementations supporting this attribute view may also support setting * the initial permissions when creating a file or directory. The * initial permissions are provided to the {@link Files#createFile createFile} diff --git a/src/share/classes/java/nio/file/spi/FileSystemProvider.java b/src/share/classes/java/nio/file/spi/FileSystemProvider.java index 84e92d9cb9296d71b34755f4331c2daf6bd6f872..5b95dcc390d7e1a04943e876a6b6bbf82db8e45b 100644 --- a/src/share/classes/java/nio/file/spi/FileSystemProvider.java +++ b/src/share/classes/java/nio/file/spi/FileSystemProvider.java @@ -287,6 +287,8 @@ public abstract class FileSystemProvider { * @param uri * The URI to convert * + * @return The resulting {@code Path} + * * @throws IllegalArgumentException * If the URI scheme does not identify this provider or other * preconditions on the uri parameter do not hold @@ -751,6 +753,8 @@ public abstract class FileSystemProvider { * @param link * the path to the symbolic link * + * @return The target of the symbolic link + * * @throws UnsupportedOperationException * if the implementation does not support symbolic links * @throws NotLinkException @@ -984,6 +988,8 @@ public abstract class FileSystemProvider { * exactly the manner specified by the {@link Files#getFileAttributeView} * method. * + * @param + * The {@code FileAttributeView} type * @param path * the path to the file * @param type @@ -1002,6 +1008,8 @@ public abstract class FileSystemProvider { * exactly the manner specified by the {@link * Files#readAttributes(Path,Class,LinkOption[])} method. * + * @param + * The {@code BasicFileAttributes} type * @param path * the path to the file * @param type diff --git a/src/share/classes/java/sql/SQLInput.java b/src/share/classes/java/sql/SQLInput.java index ae65e67ac6fd8d1024c52274754c841b21ceded0..b768fa95e1e54e821aa2ebbb7c9e585d1b45c35e 100644 --- a/src/share/classes/java/sql/SQLInput.java +++ b/src/share/classes/java/sql/SQLInput.java @@ -444,7 +444,7 @@ public interface SQLInput { *

* The default implementation will throw {@code SQLFeatureNotSupportedException} * - * @param the type of the class modeled by this Class object + * @param the type of the class modeled by this Class object * @param type Class representing the Java data type to convert the attribute to. * @return the attribute at the head of the stream as an {@code Object} in the * Java programming language;{@code null} if the attribute is SQL {@code NULL}

Name Type