Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8241760: Typos: empty lines in javadoc, inconsistent indents, etc. (n…
Browse files Browse the repository at this point in the history
…et and nio)

Reviewed-by: alanb, prappo, dfuchs
  • Loading branch information
Ivan Gerasimov committed Mar 30, 2020
1 parent 916f00a commit 53b2368
Show file tree
Hide file tree
Showing 25 changed files with 107 additions and 99 deletions.
14 changes: 7 additions & 7 deletions src/java.base/share/classes/java/net/HttpURLConnection.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
Expand Down Expand Up @@ -424,11 +424,11 @@ public static boolean getFollowRedirects() {
* @see #getInstanceFollowRedirects
* @since 1.3
*/
public void setInstanceFollowRedirects(boolean followRedirects) {
public void setInstanceFollowRedirects(boolean followRedirects) {
instanceFollowRedirects = followRedirects;
}
}

/**
/**
* Returns the value of this {@code HttpURLConnection}'s
* {@code instanceFollowRedirects} field.
*
Expand All @@ -438,9 +438,9 @@ public void setInstanceFollowRedirects(boolean followRedirects) {
* @see #setInstanceFollowRedirects(boolean)
* @since 1.3
*/
public boolean getInstanceFollowRedirects() {
return instanceFollowRedirects;
}
public boolean getInstanceFollowRedirects() {
return instanceFollowRedirects;
}

/**
* Set the method for the URL request, one of:
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/net/Inet4Address.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
Expand Down Expand Up @@ -51,7 +51,7 @@
* <p> When four parts are specified, each is interpreted as a byte of
* data and assigned, from left to right, to the four bytes of an IPv4
* address.
*
* <p> When a three part address is specified, the last part is
* interpreted as a 16-bit quantity and placed in the right most two
* bytes of the network address. This makes the three part address
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/net/NetPermission.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
Expand Down Expand Up @@ -164,7 +164,7 @@
* creating a ProtectionDomain/CodeSource for a class even though
* that class really didn't come from that location.</td>
* </tr>
</tbody>
* </tbody>
* </table>
*
* @implNote
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/net/Proxy.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
Expand Down Expand Up @@ -131,7 +131,7 @@ public String toString() {
return type() + " @ " + address();
}

/**
/**
* Compares this object against the specified object.
* The result is {@code true} if and only if the argument is
* not {@code null} and it represents the same proxy as
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/net/SecureCacheResponse.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2020, 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
Expand Down Expand Up @@ -93,7 +93,7 @@ public abstract List<Certificate> getServerCertificateChain()
public abstract Principal getPeerPrincipal()
throws SSLPeerUnverifiedException;

/**
/**
* Returns the principal that was sent to the server during
* handshaking in the original connection that retrieved the
* network resource.
Expand Down
3 changes: 1 addition & 2 deletions src/java.base/share/classes/java/net/Socket.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2020, 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
Expand Down Expand Up @@ -821,7 +821,6 @@ public int getLocalPort() {
* then this method will continue to return the connected address
* after the socket is closed.
*
* @return a {@code SocketAddress} representing the remote endpoint of this
* socket, or {@code null} if it is not connected yet.
* @see #getInetAddress()
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/net/SocketImpl.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2020, 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
Expand Down Expand Up @@ -187,7 +187,7 @@ public SocketImpl() { }
* @return a stream for reading from this socket.
* @throws IOException if an I/O error occurs when creating the
* input stream.
*/
*/
protected abstract InputStream getInputStream() throws IOException;

/**
Expand Down
6 changes: 3 additions & 3 deletions src/java.base/share/classes/java/net/URL.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2020, 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
Expand Down Expand Up @@ -414,7 +414,7 @@ public URL(String protocol, String host, String file)
* @param file the file on the host
* @param handler the stream handler for the URL.
* @throws MalformedURLException if an unknown protocol or the port
is a negative number other than -1
* is a negative number other than -1
* @throws SecurityException
* if a security manager exists and its
* {@code checkPermission} method doesn't allow
Expand Down Expand Up @@ -781,7 +781,7 @@ private void checkSpecifyHandler(SecurityManager sm) {
*
* @param protocol the name of the protocol to use
* @param host the name of the host
@param port the port number on the host
* @param port the port number on the host
* @param file the file on the host
* @param ref the internal reference in the URL
*/
Expand Down
34 changes: 17 additions & 17 deletions src/java.base/share/classes/java/net/URLConnection.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2020, 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
Expand Down Expand Up @@ -157,7 +157,7 @@
*/
public abstract class URLConnection {

/**
/**
* The URL represents the remote object on the World Wide Web to
* which this connection is opened.
* <p>
Expand All @@ -172,7 +172,7 @@ public abstract class URLConnection {
*/
protected URL url;

/**
/**
* This variable is set by the {@code setDoInput} method. Its
* value is returned by the {@code getDoInput} method.
* <p>
Expand All @@ -187,7 +187,7 @@ public abstract class URLConnection {
*/
protected boolean doInput = true;

/**
/**
* This variable is set by the {@code setDoOutput} method. Its
* value is returned by the {@code getDoOutput} method.
* <p>
Expand All @@ -204,7 +204,7 @@ public abstract class URLConnection {

private static boolean defaultAllowUserInteraction = false;

/**
/**
* If {@code true}, this {@code URL} is being examined in
* a context in which it makes sense to allow user interactions such
* as popping up an authentication dialog. If {@code false},
Expand All @@ -225,7 +225,7 @@ public abstract class URLConnection {

private static volatile boolean defaultUseCaches = true;

/**
/**
* If {@code true}, the protocol is allowed to use caching
* whenever it can. If {@code false}, the protocol must always
* try to get a fresh copy of the object.
Expand All @@ -248,7 +248,7 @@ public abstract class URLConnection {
private static final ConcurrentHashMap<String,Boolean> defaultCaching =
new ConcurrentHashMap<>();

/**
/**
* Some protocols support skipping the fetching of the object unless
* the object has been modified more recently than a certain time.
* <p>
Expand All @@ -268,7 +268,7 @@ public abstract class URLConnection {
*/
protected long ifModifiedSince = 0;

/**
/**
* If {@code false}, this connection object has not created a
* communications link to the specified URL. If {@code true},
* the communications link has been established.
Expand All @@ -286,9 +286,9 @@ public abstract class URLConnection {
*/
private MessageHeader requests;

/**
* @since 1.1
*/
/**
* @since 1.1
*/
private static volatile FileNameMap fileNameMap;

/**
Expand Down Expand Up @@ -372,7 +372,7 @@ public static void setFileNameMap(FileNameMap map) {
* connection can be established, a
* java.net.SocketTimeoutException is raised. A timeout of zero is
* interpreted as an infinite timeout.
*
* <p> Some non-standard implementation of this method may ignore
* the specified timeout. To see the connect timeout set, please
* call getConnectTimeout().
Expand Down Expand Up @@ -416,7 +416,7 @@ public int getConnectTimeout() {
* for read, a java.net.SocketTimeoutException is raised. A
* timeout of zero is interpreted as an infinite timeout.
*
*<p> Some non-standard implementation of this method ignores the
* <p> Some non-standard implementation of this method ignores the
* specified timeout. To see the read timeout set, please call
* getReadTimeout().
*
Expand Down Expand Up @@ -1032,7 +1032,7 @@ public long getIfModifiedSince() {
return ifModifiedSince;
}

/**
/**
* Returns the default value of a {@code URLConnection}'s
* {@code useCaches} flag.
* <p>
Expand All @@ -1049,7 +1049,7 @@ public boolean getDefaultUseCaches() {
return defaultUseCaches;
}

/**
/**
* Sets the default value of the {@code useCaches} field to the
* specified value. This default value can be over-ridden
* per protocol using {@link #setDefaultUseCaches(String,boolean)}
Expand All @@ -1061,7 +1061,7 @@ public void setDefaultUseCaches(boolean defaultusecaches) {
defaultUseCaches = defaultusecaches;
}

/**
/**
* Sets the default value of the {@code useCaches} field for the named
* protocol to the given value. This value overrides any default setting
* set by {@link #setDefaultUseCaches(boolean)} for the given protocol.
Expand All @@ -1078,7 +1078,7 @@ public static void setDefaultUseCaches(String protocol, boolean defaultVal) {
defaultCaching.put(protocol, defaultVal);
}

/**
/**
* Returns the default value of the {@code useCaches} flag for the given protocol. If
* {@link #setDefaultUseCaches(String,boolean)} was called for the given protocol,
* then that value is returned. Otherwise, if {@link #setDefaultUseCaches(boolean)}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2020, 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
Expand Down Expand Up @@ -332,7 +332,7 @@ public static AsynchronousChannelGroup withThreadPool(ExecutorService executor)

/**
* Awaits termination of the group.
*
* <p> This method blocks until the group has terminated, or the timeout
* occurs, or the current thread is interrupted, whichever happens first.
*
Expand Down
Expand Up @@ -346,7 +346,7 @@ public int interestOpsAnd(int ops) {
* method always returns {@code false}. </p>
*
* @return {@code true} if, and only if,
{@code readyOps() & OP_READ} is nonzero
* {@code readyOps() & OP_READ} is nonzero
*
* @throws CancelledKeyException
* If this key has been cancelled
Expand Down
3 changes: 1 addition & 2 deletions src/java.base/share/classes/java/nio/charset/Charset.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
Expand Down Expand Up @@ -196,7 +196,6 @@
* charsets interpret the initial byte-order marks as a <small>ZERO-WIDTH
* NON-BREAKING SPACE</small>; when encoding, they do not write
* byte-order marks. </p></li>
*
* <li><p> When decoding, the {@code UTF-16} charset interprets the
* byte-order mark at the beginning of the input stream to indicate the
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/nio/file/FileStore.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2020, 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
Expand Down Expand Up @@ -237,7 +237,7 @@ public long getBlockSize() throws IOException {
*
* @param attribute
* the attribute to read
*
* @return the attribute value; {@code null} may be valid for some
* attributes
*
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2020, 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
Expand Down Expand Up @@ -32,7 +32,7 @@
* attributes common to many file systems. The basic set of file attributes
* consist of <em>mandatory</em> and <em>optional</em> file attributes as
* defined by the {@link BasicFileAttributes} interface.
*
* <p> The file attributes are retrieved from the file system as a <em>bulk
* operation</em> by invoking the {@link #readAttributes() readAttributes} method.
* This class also defines the {@link #setTimes setTimes} method to update the
Expand Down

0 comments on commit 53b2368

Please sign in to comment.