8325189
: Enable this-escape javac warning in java.base
Reviewed-by: alanb, erikj, naoto, smarks, ihse, joehw, lancea, weijun
This commit is contained in:
parent
299a8ee68d
commit
fbd15b2087
@ -23,7 +23,11 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
DISABLED_WARNINGS_java += this-escape
|
||||
# The base module should be built with all warnings enabled. When a
|
||||
# new warning is added to javac, it can be temporarily added to the
|
||||
# disabled warnings list.
|
||||
#
|
||||
# DISABLED_WARNINGS_java +=
|
||||
|
||||
DOCLINT += -Xdoclint:all/protected \
|
||||
'-Xdoclint/package:java.*,javax.*'
|
||||
|
@ -64,6 +64,7 @@ public abstract class Server extends NTLM {
|
||||
* @param domain the domain, must not be null
|
||||
* @throws NTLMException if {@code domain} is null.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Server(String version, String domain) throws NTLMException {
|
||||
super(version);
|
||||
if (domain == null) {
|
||||
|
@ -133,6 +133,7 @@ public class FileInputStream extends InputStream
|
||||
* @see java.io.File#getPath()
|
||||
* @see java.lang.SecurityManager#checkRead(java.lang.String)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public FileInputStream(File file) throws FileNotFoundException {
|
||||
String name = (file != null ? file.getPath() : null);
|
||||
@SuppressWarnings("removal")
|
||||
@ -177,6 +178,7 @@ public class FileInputStream extends InputStream
|
||||
* file descriptor.
|
||||
* @see SecurityManager#checkRead(java.io.FileDescriptor)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public FileInputStream(FileDescriptor fdObj) {
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
|
@ -208,6 +208,7 @@ public class FileOutputStream extends OutputStream
|
||||
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public FileOutputStream(File file, boolean append)
|
||||
throws FileNotFoundException
|
||||
{
|
||||
@ -254,6 +255,7 @@ public class FileOutputStream extends OutputStream
|
||||
* write access to the file descriptor
|
||||
* @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public FileOutputStream(FileDescriptor fdObj) {
|
||||
@SuppressWarnings("removal")
|
||||
SecurityManager security = System.getSecurityManager();
|
||||
|
@ -84,6 +84,7 @@ public class InputStreamReader extends Reader {
|
||||
*
|
||||
* @see Charset#defaultCharset()
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputStreamReader(InputStream in) {
|
||||
super(in);
|
||||
Charset cs = Charset.defaultCharset();
|
||||
@ -102,6 +103,7 @@ public class InputStreamReader extends Reader {
|
||||
* @throws UnsupportedEncodingException
|
||||
* If the named charset is not supported
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputStreamReader(InputStream in, String charsetName)
|
||||
throws UnsupportedEncodingException
|
||||
{
|
||||
@ -119,6 +121,7 @@ public class InputStreamReader extends Reader {
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputStreamReader(InputStream in, Charset cs) {
|
||||
super(in);
|
||||
if (cs == null)
|
||||
@ -134,6 +137,7 @@ public class InputStreamReader extends Reader {
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputStreamReader(InputStream in, CharsetDecoder dec) {
|
||||
super(in);
|
||||
if (dec == null)
|
||||
|
@ -390,6 +390,7 @@ public class ObjectInputStream
|
||||
* @see ObjectInputStream#readFields()
|
||||
* @see ObjectOutputStream#ObjectOutputStream(OutputStream)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ObjectInputStream(InputStream in) throws IOException {
|
||||
verifySubclass();
|
||||
bin = new BlockDataInputStream(in);
|
||||
|
@ -246,6 +246,7 @@ public class ObjectOutputStream
|
||||
* @see ObjectOutputStream#putFields()
|
||||
* @see ObjectInputStream#ObjectInputStream(InputStream)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ObjectOutputStream(OutputStream out) throws IOException {
|
||||
verifySubclass();
|
||||
bout = new BlockDataOutputStream(out);
|
||||
|
@ -101,6 +101,7 @@ public class OutputStreamWriter extends Writer {
|
||||
* @throws UnsupportedEncodingException
|
||||
* If the named encoding is not supported
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public OutputStreamWriter(OutputStream out, String charsetName)
|
||||
throws UnsupportedEncodingException
|
||||
{
|
||||
@ -118,6 +119,7 @@ public class OutputStreamWriter extends Writer {
|
||||
* @param out An OutputStream
|
||||
* @see Charset#defaultCharset()
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public OutputStreamWriter(OutputStream out) {
|
||||
super(out);
|
||||
se = StreamEncoder.forOutputStreamWriter(out, lockFor(this),
|
||||
@ -135,6 +137,7 @@ public class OutputStreamWriter extends Writer {
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public OutputStreamWriter(OutputStream out, Charset cs) {
|
||||
super(out);
|
||||
if (cs == null)
|
||||
@ -153,6 +156,7 @@ public class OutputStreamWriter extends Writer {
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public OutputStreamWriter(OutputStream out, CharsetEncoder enc) {
|
||||
super(out);
|
||||
if (enc == null)
|
||||
|
@ -122,6 +122,7 @@ public class PipedInputStream extends InputStream {
|
||||
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
|
||||
* @since 1.6
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PipedInputStream(PipedOutputStream src, int pipeSize)
|
||||
throws IOException {
|
||||
initPipe(pipeSize);
|
||||
|
@ -59,6 +59,7 @@ public class PipedOutputStream extends OutputStream {
|
||||
* @param snk The piped input stream to connect to.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PipedOutputStream(PipedInputStream snk) throws IOException {
|
||||
connect(snk);
|
||||
}
|
||||
|
@ -95,6 +95,7 @@ public class PipedReader extends Reader {
|
||||
* @throws IllegalArgumentException if {@code pipeSize <= 0}.
|
||||
* @since 1.6
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PipedReader(PipedWriter src, int pipeSize) throws IOException {
|
||||
initPipe(pipeSize);
|
||||
connect(src);
|
||||
|
@ -57,6 +57,7 @@ public class PipedWriter extends Writer {
|
||||
* @param snk The piped reader to connect to.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PipedWriter(PipedReader snk) throws IOException {
|
||||
connect(snk);
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ public class PrintStream extends FilterOutputStream
|
||||
* @see java.io.PrintWriter#PrintWriter(java.io.OutputStream, boolean)
|
||||
* @see Charset#defaultCharset()
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PrintStream(OutputStream out, boolean autoFlush) {
|
||||
this(autoFlush, requireNonNull(out, "Null output stream"));
|
||||
}
|
||||
@ -212,6 +213,7 @@ public class PrintStream extends FilterOutputStream
|
||||
*
|
||||
* @since 10
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PrintStream(OutputStream out, boolean autoFlush, Charset charset) {
|
||||
super(out);
|
||||
this.autoFlush = autoFlush;
|
||||
@ -255,6 +257,7 @@ public class PrintStream extends FilterOutputStream
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PrintStream(String fileName) throws FileNotFoundException {
|
||||
this(false, new FileOutputStream(fileName));
|
||||
}
|
||||
@ -356,6 +359,7 @@ public class PrintStream extends FilterOutputStream
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PrintStream(File file) throws FileNotFoundException {
|
||||
this(false, new FileOutputStream(file));
|
||||
}
|
||||
|
@ -215,6 +215,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable {
|
||||
* @see java.lang.SecurityManager#checkWrite(java.lang.String)
|
||||
* @see java.nio.channels.FileChannel#force(boolean)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public RandomAccessFile(File file, String mode)
|
||||
throws FileNotFoundException
|
||||
{
|
||||
|
@ -228,6 +228,7 @@ public class StreamTokenizer {
|
||||
* @see java.io.StreamTokenizer#StreamTokenizer(java.io.Reader)
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("this-escape")
|
||||
public StreamTokenizer(InputStream is) {
|
||||
this();
|
||||
if (is == null) {
|
||||
@ -242,6 +243,7 @@ public class StreamTokenizer {
|
||||
* @param r a Reader object providing the input stream.
|
||||
* @since 1.1
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public StreamTokenizer(Reader r) {
|
||||
this();
|
||||
if (r == null) {
|
||||
|
@ -57,6 +57,7 @@ public class WriteAbortedException extends ObjectStreamException {
|
||||
* @param s String describing the exception.
|
||||
* @param ex Exception causing the abort.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public WriteAbortedException(String s, Exception ex) {
|
||||
super(s);
|
||||
initCause(null); // Disallow subsequent initCause
|
||||
|
@ -71,6 +71,7 @@ public class AssertionError extends Error {
|
||||
* @param detailMessage value to be used in constructing detail message
|
||||
* @see Throwable#getCause()
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public AssertionError(Object detailMessage) {
|
||||
this(String.valueOf(detailMessage));
|
||||
if (detailMessage instanceof Throwable)
|
||||
|
@ -77,6 +77,7 @@ public class BootstrapMethodError extends LinkageError {
|
||||
*
|
||||
* @param cause the cause, may be {@code null}.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public BootstrapMethodError(Throwable cause) {
|
||||
// cf. Throwable(Throwable cause) constructor.
|
||||
super(cause == null ? null : cause.toString());
|
||||
|
@ -431,6 +431,7 @@ public abstract class ClassLoader {
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected ClassLoader(String name, ClassLoader parent) {
|
||||
this(checkCreateClassLoader(name), name, parent);
|
||||
}
|
||||
@ -457,6 +458,7 @@ public abstract class ClassLoader {
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected ClassLoader(ClassLoader parent) {
|
||||
this(checkCreateClassLoader(), null, parent);
|
||||
}
|
||||
@ -476,6 +478,7 @@ public abstract class ClassLoader {
|
||||
* {@code checkCreateClassLoader} method doesn't allow creation
|
||||
* of a new class loader.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected ClassLoader() {
|
||||
this(checkCreateClassLoader(), null, getSystemClassLoader());
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ public class ExceptionInInitializerError extends LinkageError {
|
||||
* throwable object.
|
||||
* A detail message is a String that describes this particular exception.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ExceptionInInitializerError() {
|
||||
initCause(null); // Disallow subsequent initCause
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ public class ThreadGroup implements Thread.UncaughtExceptionHandler {
|
||||
* thread in the specified thread group.
|
||||
* @see java.lang.ThreadGroup#checkAccess()
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ThreadGroup(ThreadGroup parent, String name) {
|
||||
this(checkParentAccess(parent), parent, name);
|
||||
}
|
||||
|
@ -260,6 +260,7 @@ public class Throwable implements Serializable {
|
||||
* <p>The {@link #fillInStackTrace()} method is called to initialize
|
||||
* the stack trace data in the newly created throwable.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Throwable() {
|
||||
fillInStackTrace();
|
||||
if (jfrTracing) {
|
||||
@ -278,6 +279,7 @@ public class Throwable implements Serializable {
|
||||
* @param message the detail message. The detail message is saved for
|
||||
* later retrieval by the {@link #getMessage()} method.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Throwable(String message) {
|
||||
fillInStackTrace();
|
||||
detailMessage = message;
|
||||
@ -303,6 +305,7 @@ public class Throwable implements Serializable {
|
||||
* unknown.)
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Throwable(String message, Throwable cause) {
|
||||
fillInStackTrace();
|
||||
detailMessage = message;
|
||||
@ -329,6 +332,7 @@ public class Throwable implements Serializable {
|
||||
* unknown.)
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Throwable(Throwable cause) {
|
||||
fillInStackTrace();
|
||||
detailMessage = (cause==null ? null : cause.toString());
|
||||
@ -378,6 +382,7 @@ public class Throwable implements Serializable {
|
||||
* @see ArithmeticException
|
||||
* @since 1.7
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Throwable(String message, Throwable cause,
|
||||
boolean enableSuppression,
|
||||
boolean writableStackTrace) {
|
||||
|
@ -266,6 +266,7 @@ public class ServerSocket implements java.io.Closeable {
|
||||
* @see SecurityManager#checkListen
|
||||
* @since 1.1
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ServerSocket(int port, int backlog, InetAddress bindAddr) throws IOException {
|
||||
if (port < 0 || port > 0xFFFF)
|
||||
throw new IllegalArgumentException("Port value out of range: " + port);
|
||||
|
@ -211,6 +211,7 @@ public class Socket implements java.io.Closeable {
|
||||
*
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(Proxy proxy) {
|
||||
// Create a copy of Proxy as a security measure
|
||||
if (proxy == null) {
|
||||
@ -319,6 +320,7 @@ public class Socket implements java.io.Closeable {
|
||||
* @see java.net.SocketImpl
|
||||
* @see SecurityManager#checkConnect
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(String host, int port)
|
||||
throws UnknownHostException, IOException
|
||||
{
|
||||
@ -353,6 +355,7 @@ public class Socket implements java.io.Closeable {
|
||||
* @see java.net.SocketImpl
|
||||
* @see SecurityManager#checkConnect
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(InetAddress address, int port) throws IOException {
|
||||
this(address != null ? new InetSocketAddress(address, port) : null,
|
||||
(SocketAddress) null, true);
|
||||
@ -394,6 +397,7 @@ public class Socket implements java.io.Closeable {
|
||||
* @see SecurityManager#checkConnect
|
||||
* @since 1.1
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(String host, int port, InetAddress localAddr,
|
||||
int localPort) throws IOException {
|
||||
this(host != null ? new InetSocketAddress(host, port) :
|
||||
@ -436,6 +440,7 @@ public class Socket implements java.io.Closeable {
|
||||
* @see SecurityManager#checkConnect
|
||||
* @since 1.1
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(InetAddress address, int port, InetAddress localAddr,
|
||||
int localPort) throws IOException {
|
||||
this(address != null ? new InetSocketAddress(address, port) : null,
|
||||
@ -483,6 +488,7 @@ public class Socket implements java.io.Closeable {
|
||||
* @deprecated Use DatagramSocket instead for UDP transport.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(String host, int port, boolean stream) throws IOException {
|
||||
this(host != null ? new InetSocketAddress(host, port) :
|
||||
new InetSocketAddress(InetAddress.getByName(null), port),
|
||||
@ -525,6 +531,7 @@ public class Socket implements java.io.Closeable {
|
||||
* @deprecated Use DatagramSocket instead for UDP transport.
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings("this-escape")
|
||||
public Socket(InetAddress host, int port, boolean stream) throws IOException {
|
||||
this(host != null ? new InetSocketAddress(host, port) : null,
|
||||
new InetSocketAddress(0), stream);
|
||||
|
@ -184,6 +184,7 @@ public abstract class Charset$Coder$ {
|
||||
* If the preconditions on the parameters do not hold
|
||||
*/
|
||||
{#if[encoder]?protected:private}
|
||||
@SuppressWarnings("this-escape")
|
||||
Charset$Coder$(Charset cs,
|
||||
float average$ItypesPerOtype$,
|
||||
float max$ItypesPerOtype$,
|
||||
@ -227,6 +228,7 @@ public abstract class Charset$Coder$ {
|
||||
* @throws IllegalArgumentException
|
||||
* If the preconditions on the parameters do not hold
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Charset$Coder$(Charset cs,
|
||||
float average$ItypesPerOtype$,
|
||||
float max$ItypesPerOtype$)
|
||||
|
@ -89,6 +89,7 @@ public class DigestInputStream extends FilterInputStream {
|
||||
*
|
||||
* @param digest the message digest to associate with this stream.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DigestInputStream(InputStream stream, MessageDigest digest) {
|
||||
super(stream);
|
||||
setMessageDigest(digest);
|
||||
|
@ -67,6 +67,7 @@ public class DigestOutputStream extends FilterOutputStream {
|
||||
*
|
||||
* @param digest the message digest to associate with this stream.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DigestOutputStream(OutputStream stream, MessageDigest digest) {
|
||||
super(stream);
|
||||
setMessageDigest(digest);
|
||||
|
@ -116,6 +116,7 @@ public abstract class Identity implements Principal, Serializable {
|
||||
* @throws KeyManagementException if there is already an {@code Identity}
|
||||
* with the same name in the scope.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Identity(String name, IdentityScope scope) throws
|
||||
KeyManagementException {
|
||||
this(name);
|
||||
|
@ -187,6 +187,7 @@ public abstract class Provider extends Properties {
|
||||
* @deprecated use {@link #Provider(String, String, String)} instead.
|
||||
*/
|
||||
@Deprecated(since="9")
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Provider(String name, double version, String info) {
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
@ -227,6 +228,7 @@ public abstract class Provider extends Properties {
|
||||
*
|
||||
* @since 9
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Provider(String name, String versionStr, String info) {
|
||||
this.name = name;
|
||||
this.versionStr = versionStr;
|
||||
|
@ -98,6 +98,7 @@ public class PKIXBuilderParameters extends PKIXParameters {
|
||||
* {@code trustAnchors} are not of type
|
||||
* {@code java.security.cert.TrustAnchor}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PKIXBuilderParameters(Set<TrustAnchor> trustAnchors, CertSelector
|
||||
targetConstraints) throws InvalidAlgorithmParameterException
|
||||
{
|
||||
@ -123,6 +124,7 @@ public class PKIXBuilderParameters extends PKIXParameters {
|
||||
* @throws NullPointerException if {@code keystore} is
|
||||
* {@code null}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PKIXBuilderParameters(KeyStore keystore,
|
||||
CertSelector targetConstraints)
|
||||
throws KeyStoreException, InvalidAlgorithmParameterException
|
||||
|
@ -114,6 +114,7 @@ public class PKIXParameters implements CertPathParameters {
|
||||
* @throws ClassCastException if any of the elements in the {@code Set}
|
||||
* are not of type {@code java.security.cert.TrustAnchor}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PKIXParameters(Set<TrustAnchor> trustAnchors)
|
||||
throws InvalidAlgorithmParameterException
|
||||
{
|
||||
@ -138,6 +139,7 @@ public class PKIXParameters implements CertPathParameters {
|
||||
* not contain at least one trusted certificate entry
|
||||
* @throws NullPointerException if the keystore is {@code null}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PKIXParameters(KeyStore keystore)
|
||||
throws KeyStoreException, InvalidAlgorithmParameterException
|
||||
{
|
||||
|
@ -104,6 +104,7 @@ public interface AttributedCharacterIterator extends CharacterIterator {
|
||||
*
|
||||
* @param name the name of {@code Attribute}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Attribute(String name) {
|
||||
this.name = name;
|
||||
if (this.getClass() == Attribute.class) {
|
||||
|
@ -223,6 +223,7 @@ public class AttributedString {
|
||||
* beginIndex and endIndex is out of the text range.
|
||||
* @see java.text.Annotation
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public AttributedString(AttributedCharacterIterator text,
|
||||
int beginIndex,
|
||||
int endIndex,
|
||||
|
@ -937,6 +937,7 @@ public abstract class DateFormat extends Format {
|
||||
* be used, but {@code -1} should be used for values
|
||||
* that don't correspond to legal {@code Calendar} values
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Field(String name, int calendarField) {
|
||||
super(name);
|
||||
this.calendarField = calendarField;
|
||||
|
@ -449,6 +449,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see java.text.NumberFormat#getCurrencyInstance
|
||||
* @see java.text.NumberFormat#getPercentInstance
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DecimalFormat() {
|
||||
// Get the pattern for the default locale.
|
||||
Locale def = Locale.getDefault(Locale.Category.FORMAT);
|
||||
@ -485,6 +486,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see java.text.NumberFormat#getCurrencyInstance
|
||||
* @see java.text.NumberFormat#getPercentInstance
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DecimalFormat(String pattern) {
|
||||
// Always applyPattern after the symbols are set
|
||||
this.symbols = DecimalFormatSymbols.getInstance(Locale.getDefault(Locale.Category.FORMAT));
|
||||
@ -515,6 +517,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see java.text.NumberFormat#getPercentInstance
|
||||
* @see java.text.DecimalFormatSymbols
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DecimalFormat (String pattern, DecimalFormatSymbols symbols) {
|
||||
// Always applyPattern after the symbols are set
|
||||
this.symbols = (DecimalFormatSymbols)symbols.clone();
|
||||
@ -4199,6 +4202,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see #getMaximumIntegerDigits
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
private int maximumIntegerDigits = super.getMaximumIntegerDigits();
|
||||
|
||||
/**
|
||||
@ -4211,6 +4215,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see #getMinimumIntegerDigits
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
private int minimumIntegerDigits = super.getMinimumIntegerDigits();
|
||||
|
||||
/**
|
||||
@ -4223,6 +4228,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see #getMaximumFractionDigits
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
private int maximumFractionDigits = super.getMaximumFractionDigits();
|
||||
|
||||
/**
|
||||
@ -4235,6 +4241,7 @@ public class DecimalFormat extends NumberFormat {
|
||||
* @see #getMinimumFractionDigits
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
private int minimumFractionDigits = super.getMinimumFractionDigits();
|
||||
|
||||
/**
|
||||
|
@ -1258,6 +1258,7 @@ public abstract class NumberFormat extends Format {
|
||||
*
|
||||
* @param name Name of the attribute
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Field(String name) {
|
||||
super(name);
|
||||
if (this.getClass() == NumberFormat.Field.class) {
|
||||
|
@ -278,6 +278,7 @@ public class RuleBasedCollator extends Collator{
|
||||
* example, build rule "a < ? < d" will cause the constructor to
|
||||
* throw the ParseException because the '?' is not quoted.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public RuleBasedCollator(String rules) throws ParseException {
|
||||
this(rules, Collator.CANONICAL_DECOMPOSITION);
|
||||
}
|
||||
|
@ -204,6 +204,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
|
||||
* @param c the collection whose elements are to be placed into the deque
|
||||
* @throws NullPointerException if the specified collection is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ArrayDeque(Collection<? extends E> c) {
|
||||
this(c.size());
|
||||
copyElements(c);
|
||||
|
@ -165,6 +165,7 @@ public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V>
|
||||
* {@code EnumMap} instance and contains no mappings
|
||||
* @throws NullPointerException if {@code m} is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public EnumMap(Map<K, ? extends V> m) {
|
||||
if (m instanceof EnumMap) {
|
||||
EnumMap<K, ? extends V> em = (EnumMap<K, ? extends V>) m;
|
||||
|
@ -588,6 +588,7 @@ public class GregorianCalendar extends Calendar {
|
||||
* in the default time zone with the default
|
||||
* {@link Locale.Category#FORMAT FORMAT} locale.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GregorianCalendar() {
|
||||
this(TimeZone.getDefaultRef(), Locale.getDefault(Locale.Category.FORMAT));
|
||||
setZoneShared(true);
|
||||
@ -612,6 +613,7 @@ public class GregorianCalendar extends Calendar {
|
||||
* @param aLocale the given locale.
|
||||
* @throws NullPointerException if {@code aLocale} is {@code null}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GregorianCalendar(Locale aLocale) {
|
||||
this(TimeZone.getDefaultRef(), aLocale);
|
||||
setZoneShared(true);
|
||||
@ -625,6 +627,7 @@ public class GregorianCalendar extends Calendar {
|
||||
* @param aLocale the given locale.
|
||||
* @throws NullPointerException if {@code zone} or {@code aLocale} is {@code null}
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GregorianCalendar(TimeZone zone, Locale aLocale) {
|
||||
super(zone, aLocale);
|
||||
gdate = gcal.newCalendarDate(zone);
|
||||
@ -640,6 +643,7 @@ public class GregorianCalendar extends Calendar {
|
||||
* Month value is 0-based. e.g., 0 for January.
|
||||
* @param dayOfMonth the value used to set the {@code DAY_OF_MONTH} calendar field in the calendar.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GregorianCalendar(int year, int month, int dayOfMonth) {
|
||||
this(year, month, dayOfMonth, 0, 0, 0, 0);
|
||||
}
|
||||
@ -657,6 +661,7 @@ public class GregorianCalendar extends Calendar {
|
||||
* @param minute the value used to set the {@code MINUTE} calendar field
|
||||
* in the calendar.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay,
|
||||
int minute) {
|
||||
this(year, month, dayOfMonth, hourOfDay, minute, 0, 0);
|
||||
@ -677,6 +682,7 @@ public class GregorianCalendar extends Calendar {
|
||||
* @param second the value used to set the {@code SECOND} calendar field
|
||||
* in the calendar.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay,
|
||||
int minute, int second) {
|
||||
this(year, month, dayOfMonth, hourOfDay, minute, second, 0);
|
||||
|
@ -487,6 +487,7 @@ public class HashMap<K,V> extends AbstractMap<K,V>
|
||||
* @param m the map whose mappings are to be placed in this map
|
||||
* @throws NullPointerException if the specified map is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public HashMap(Map<? extends K, ? extends V> m) {
|
||||
this.loadFactor = DEFAULT_LOAD_FACTOR;
|
||||
putMapEntries(m, false);
|
||||
|
@ -116,6 +116,7 @@ public class HashSet<E>
|
||||
* @param c the collection whose elements are to be placed into this set
|
||||
* @throws NullPointerException if the specified collection is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public HashSet(Collection<? extends E> c) {
|
||||
map = HashMap.newHashMap(Math.max(c.size(), 12));
|
||||
addAll(c);
|
||||
|
@ -226,6 +226,7 @@ public class Hashtable<K,V>
|
||||
* @throws NullPointerException if the specified map is null.
|
||||
* @since 1.2
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Hashtable(Map<? extends K, ? extends V> t) {
|
||||
this(Math.max(2*t.size(), 11), 0.75f);
|
||||
putAll(t);
|
||||
|
@ -273,6 +273,7 @@ public class IdentityHashMap<K,V>
|
||||
* @param m the map whose mappings are to be placed into this map
|
||||
* @throws NullPointerException if the specified map is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public IdentityHashMap(Map<? extends K, ? extends V> m) {
|
||||
// Allow for a bit of growth
|
||||
this((int) ((1 + m.size()) * 1.1));
|
||||
|
@ -55,6 +55,7 @@ public class InvalidPropertiesFormatException extends IOException {
|
||||
* @param cause the cause (which is saved for later retrieval by the
|
||||
* {@link Throwable#getCause()} method).
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InvalidPropertiesFormatException(Throwable cause) {
|
||||
super(cause==null ? null : cause.toString());
|
||||
this.initCause(cause);
|
||||
|
@ -474,6 +474,7 @@ public class LinkedHashMap<K,V>
|
||||
* @param m the map whose mappings are to be placed in this map
|
||||
* @throws NullPointerException if the specified map is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public LinkedHashMap(Map<? extends K, ? extends V> m) {
|
||||
super();
|
||||
accessOrder = false;
|
||||
|
@ -177,6 +177,7 @@ public class LinkedHashSet<E>
|
||||
* this set
|
||||
* @throws NullPointerException if the specified collection is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public LinkedHashSet(Collection<? extends E> c) {
|
||||
super(HashMap.calculateHashMapCapacity(Math.max(c.size(), 12)), .75f, true);
|
||||
addAll(c);
|
||||
|
@ -125,6 +125,7 @@ public class LinkedList<E>
|
||||
* @param c the collection whose elements are to be placed into this list
|
||||
* @throws NullPointerException if the specified collection is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public LinkedList(Collection<? extends E> c) {
|
||||
this();
|
||||
addAll(c);
|
||||
|
@ -350,6 +350,7 @@ public class Random implements RandomGenerator, java.io.Serializable {
|
||||
* @param seed the initial seed
|
||||
* @see #setSeed(long)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Random(long seed) {
|
||||
if (getClass() == Random.class)
|
||||
this.seed = new AtomicLong(initialScramble(seed));
|
||||
|
@ -156,6 +156,7 @@ public class SimpleTimeZone extends TimeZone {
|
||||
* @param rawOffset The base time zone offset in milliseconds to GMT.
|
||||
* @param ID The time zone name that is given to this instance.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public SimpleTimeZone(int rawOffset, String ID)
|
||||
{
|
||||
this.rawOffset = rawOffset;
|
||||
@ -326,6 +327,7 @@ public class SimpleTimeZone extends TimeZone {
|
||||
*
|
||||
* @since 1.4
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public SimpleTimeZone(int rawOffset, String ID,
|
||||
int startMonth, int startDay, int startDayOfWeek,
|
||||
int startTime, int startTimeMode,
|
||||
|
@ -178,6 +178,7 @@ public class Timer {
|
||||
* @throws NullPointerException if {@code name} is null
|
||||
* @since 1.5
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Timer(String name, boolean isDaemon) {
|
||||
var threadReaper = new ThreadReaper(queue, thread);
|
||||
this.cleanup = CleanerFactory.cleaner().register(this, threadReaper);
|
||||
|
@ -193,6 +193,7 @@ public class TreeMap<K,V>
|
||||
* or are not mutually comparable
|
||||
* @throws NullPointerException if the specified map is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TreeMap(Map<? extends K, ? extends V> m) {
|
||||
comparator = null;
|
||||
putAll(m);
|
||||
|
@ -159,6 +159,7 @@ public class TreeSet<E> extends AbstractSet<E>
|
||||
* not {@link Comparable}, or are not mutually comparable
|
||||
* @throws NullPointerException if the specified collection is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TreeSet(Collection<? extends E> c) {
|
||||
this();
|
||||
addAll(c);
|
||||
@ -171,6 +172,7 @@ public class TreeSet<E> extends AbstractSet<E>
|
||||
* @param s sorted set whose elements will comprise the new set
|
||||
* @throws NullPointerException if the specified sorted set is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TreeSet(SortedSet<E> s) {
|
||||
this(s.comparator());
|
||||
addAll(s);
|
||||
|
@ -256,6 +256,7 @@ public class WeakHashMap<K,V>
|
||||
* @throws NullPointerException if the specified map is null
|
||||
* @since 1.3
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public WeakHashMap(Map<? extends K, ? extends V> m) {
|
||||
this(Math.max((int) Math.ceil(m.size() / (double)DEFAULT_LOAD_FACTOR),
|
||||
DEFAULT_INITIAL_CAPACITY),
|
||||
|
@ -847,6 +847,7 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
|
||||
*
|
||||
* @param m the map
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ConcurrentHashMap(Map<? extends K, ? extends V> m) {
|
||||
this(m.size());
|
||||
putAll(m);
|
||||
|
@ -1096,6 +1096,7 @@ public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
|
||||
* @throws NullPointerException if the specified map or any of its keys
|
||||
* or values are null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ConcurrentSkipListMap(Map<? extends K, ? extends V> m) {
|
||||
this.comparator = null;
|
||||
putAll(m);
|
||||
@ -1110,6 +1111,7 @@ public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
|
||||
* @throws NullPointerException if the specified sorted map or any of
|
||||
* its keys or values are null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ConcurrentSkipListMap(SortedMap<K, ? extends V> m) {
|
||||
this.comparator = m.comparator();
|
||||
buildFromSorted(m); // initializes transients
|
||||
|
@ -137,6 +137,7 @@ public class ConcurrentSkipListSet<E>
|
||||
* @throws NullPointerException if the specified collection or any
|
||||
* of its elements are null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ConcurrentSkipListSet(Collection<? extends E> c) {
|
||||
m = new ConcurrentSkipListMap<E,Object>();
|
||||
addAll(c);
|
||||
@ -150,6 +151,7 @@ public class ConcurrentSkipListSet<E>
|
||||
* @throws NullPointerException if the specified sorted set or any
|
||||
* of its elements are null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ConcurrentSkipListSet(SortedSet<E> s) {
|
||||
m = new ConcurrentSkipListMap<E,Object>(s.comparator());
|
||||
addAll(s);
|
||||
|
@ -141,6 +141,7 @@ public class DelayQueue<E extends Delayed> extends AbstractQueue<E>
|
||||
* @throws NullPointerException if the specified collection or any
|
||||
* of its elements are null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DelayQueue(Collection<? extends E> c) {
|
||||
this.addAll(c);
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ public class ForkJoinWorkerThread extends Thread {
|
||||
* @throws NullPointerException if pool is null
|
||||
* @since 19
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected ForkJoinWorkerThread(ThreadGroup group, ForkJoinPool pool,
|
||||
boolean preserveThreadLocals) {
|
||||
this(group, pool, false, !preserveThreadLocals);
|
||||
@ -110,6 +111,7 @@ public class ForkJoinWorkerThread extends Thread {
|
||||
* @param pool the pool this thread works in
|
||||
* @throws NullPointerException if pool is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected ForkJoinWorkerThread(ForkJoinPool pool) {
|
||||
this(null, pool, false, false);
|
||||
}
|
||||
|
@ -195,6 +195,7 @@ public class LinkedBlockingDeque<E>
|
||||
* @throws NullPointerException if the specified collection or any
|
||||
* of its elements are null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public LinkedBlockingDeque(Collection<? extends E> c) {
|
||||
this(Integer.MAX_VALUE);
|
||||
addAll(c);
|
||||
|
@ -413,6 +413,7 @@ public class StructuredTaskScope<T> implements AutoCloseable {
|
||||
* @param name the name of the task scope, can be null
|
||||
* @param factory the thread factory
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public StructuredTaskScope(String name, ThreadFactory factory) {
|
||||
this.factory = Objects.requireNonNull(factory, "'factory' is null");
|
||||
if (name == null)
|
||||
|
@ -1297,6 +1297,7 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
||||
* @throws NullPointerException if {@code workQueue}
|
||||
* or {@code threadFactory} or {@code handler} is null
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ThreadPoolExecutor(int corePoolSize,
|
||||
int maximumPoolSize,
|
||||
long keepAliveTime,
|
||||
|
@ -120,6 +120,7 @@ public class JarInputStream extends ZipInputStream {
|
||||
* it is signed.
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public JarInputStream(InputStream in, boolean verify) throws IOException {
|
||||
super(in);
|
||||
this.doVerify = verify;
|
||||
|
@ -53,6 +53,7 @@ public class JarOutputStream extends ZipOutputStream {
|
||||
* @param man the optional {@code Manifest}
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
|
||||
super(out);
|
||||
if (man == null) {
|
||||
|
@ -73,6 +73,7 @@ public class Manifest implements Cloneable {
|
||||
* @param is the input stream containing manifest data
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Manifest(InputStream is) throws IOException {
|
||||
this(null, is, null);
|
||||
}
|
||||
|
@ -196,6 +196,7 @@ public class Deflater {
|
||||
* @param level the compression level (0-9)
|
||||
* @param nowrap if true then use GZIP compatible compression
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Deflater(int level, boolean nowrap) {
|
||||
this.level = level;
|
||||
this.strategy = DEFAULT_STRATEGY;
|
||||
|
@ -130,6 +130,7 @@ public class Inflater {
|
||||
*
|
||||
* @param nowrap if true then support GZIP compatible compression
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public Inflater(boolean nowrap) {
|
||||
this.zsRef = new InflaterZStreamRef(this, init(nowrap));
|
||||
}
|
||||
|
@ -227,6 +227,7 @@ public class ZipFile implements ZipConstants, Closeable {
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ZipFile(File file, int mode, Charset charset) throws IOException
|
||||
{
|
||||
if (((mode & OPEN_READ) == 0) ||
|
||||
|
@ -115,6 +115,7 @@ public class SSLParameters {
|
||||
*
|
||||
* @param cipherSuites the array of ciphersuites (or null)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public SSLParameters(String[] cipherSuites) {
|
||||
setCipherSuites(cipherSuites);
|
||||
}
|
||||
@ -136,6 +137,7 @@ public class SSLParameters {
|
||||
* @param cipherSuites the array of ciphersuites (or null)
|
||||
* @param protocols the array of protocols (or null)
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public SSLParameters(String[] cipherSuites, String[] protocols) {
|
||||
setCipherSuites(cipherSuites);
|
||||
setProtocols(protocols);
|
||||
|
@ -51,6 +51,7 @@ public class CarrierThread extends ForkJoinWorkerThread {
|
||||
|
||||
private boolean blocking; // true if in blocking op
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public CarrierThread(ForkJoinPool pool) {
|
||||
super(CARRIER_THREADGROUP, pool, true);
|
||||
U.putReference(this, CONTEXTCLASSLOADER, ClassLoader.getSystemClassLoader());
|
||||
|
@ -205,6 +205,7 @@ public class ClassReader {
|
||||
* @param classFileOffset the offset in byteBuffer of the first byte of the ClassFile to be read.
|
||||
* @param classFileLength the length in bytes of the ClassFile to be read.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ClassReader(
|
||||
final byte[] classFileBuffer,
|
||||
final int classFileOffset,
|
||||
|
@ -292,6 +292,7 @@ public class ClassWriter extends ClassVisitor {
|
||||
* do not affect methods that are copied as is in the new class. This means that neither the
|
||||
* maximum stack size nor the stack frames will be computed for these methods</i>.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public ClassWriter(final ClassReader classReader, final int flags) {
|
||||
super(/* latest api = */ Opcodes.ASM9);
|
||||
this.flags = flags;
|
||||
|
@ -114,6 +114,7 @@ public class InputSource {
|
||||
* @see #setEncoding
|
||||
* @see #setCharacterStream
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputSource (String systemId)
|
||||
{
|
||||
setSystemId(systemId);
|
||||
@ -135,6 +136,7 @@ public class InputSource {
|
||||
* @see #setByteStream
|
||||
* @see #setCharacterStream
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputSource (InputStream byteStream)
|
||||
{
|
||||
setByteStream(byteStream);
|
||||
@ -155,6 +157,7 @@ public class InputSource {
|
||||
* @see #setByteStream
|
||||
* @see #setCharacterStream
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public InputSource (Reader characterStream)
|
||||
{
|
||||
setCharacterStream(characterStream);
|
||||
|
@ -243,6 +243,7 @@ public abstract class Parser {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
protected Parser() {
|
||||
mPh = PH_BEFORE_DOC; // before parsing
|
||||
|
||||
|
@ -229,6 +229,7 @@ public class NetworkClient {
|
||||
}
|
||||
|
||||
/** Create connection with host <i>host</i> on port <i>port</i> */
|
||||
@SuppressWarnings("this-escape")
|
||||
public NetworkClient(String host, int port) throws IOException {
|
||||
openServer(host, port);
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ class MessageHeader {
|
||||
grow();
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public MessageHeader (InputStream is) throws java.io.IOException {
|
||||
parseHeader(is);
|
||||
}
|
||||
|
@ -677,6 +677,7 @@ public class DoubleByte {
|
||||
return encodeBufferLoop(src, dst);
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
protected byte[] repl = replacement();
|
||||
protected void implReplaceWith(byte[] newReplacement) {
|
||||
repl = newReplacement;
|
||||
|
@ -355,6 +355,7 @@ public class HKSCS {
|
||||
return encodeBufferLoop(src, dst);
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
private byte[] repl = replacement();
|
||||
protected void implReplaceWith(byte[] newReplacement) {
|
||||
repl = newReplacement;
|
||||
|
@ -402,6 +402,7 @@ public class PKCS9Attribute implements DerEncoder {
|
||||
* @param derVal the DerValue representing the DER encoding of the attribute.
|
||||
* @exception IOException on parsing error.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public PKCS9Attribute(DerValue derVal) throws IOException {
|
||||
|
||||
DerInputStream derIn = new DerInputStream(derVal.toByteArray());
|
||||
|
@ -59,6 +59,7 @@ public class CtrDrbg extends AbstractDrbg {
|
||||
private byte[] v;
|
||||
private byte[] k;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public CtrDrbg(SecureRandomParameters params) {
|
||||
mechName = "CTR_DRBG";
|
||||
configure(params);
|
||||
|
@ -81,6 +81,7 @@ implements java.security.interfaces.DSAPublicKey, Serializable {
|
||||
* @param q DSA parameter q, may be null if all of p, q, and g are null.
|
||||
* @param g DSA parameter g, may be null if all of p, q, and g are null.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DSAPublicKey(BigInteger y, BigInteger p, BigInteger q,
|
||||
BigInteger g) {
|
||||
this.y = y;
|
||||
@ -95,6 +96,7 @@ implements java.security.interfaces.DSAPublicKey, Serializable {
|
||||
/**
|
||||
* Make a DSA public key from its DER encoding (X.509).
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DSAPublicKey(byte[] encoded) throws InvalidKeyException {
|
||||
decode(encoded);
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ public class HashDrbg extends AbstractHashDrbg {
|
||||
private byte[] v;
|
||||
private byte[] c;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public HashDrbg(SecureRandomParameters params) {
|
||||
mechName = "Hash_DRBG";
|
||||
configure(params);
|
||||
|
@ -45,6 +45,7 @@ public class HmacDrbg extends AbstractHashDrbg {
|
||||
private byte[] v;
|
||||
private byte[] k;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public HmacDrbg(SecureRandomParameters params) {
|
||||
mechName = "HMAC_DRBG";
|
||||
configure(params);
|
||||
|
@ -115,6 +115,7 @@ public class BitArray {
|
||||
* Create a BitArray whose bits are those of the given array
|
||||
* of Booleans.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public BitArray(boolean[] bits) {
|
||||
length = bits.length;
|
||||
repn = new byte[(length + 7)/8];
|
||||
|
@ -340,6 +340,7 @@ public class DerValue {
|
||||
*
|
||||
* This is a public constructor.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DerValue(byte[] encoding) throws IOException {
|
||||
this(encoding.clone(), 0, encoding.length, true, false);
|
||||
}
|
||||
@ -487,6 +488,7 @@ public class DerValue {
|
||||
* @param in the input stream holding a single DER datum,
|
||||
* which may be followed by additional data
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public DerValue(InputStream in) throws IOException {
|
||||
this(in, true);
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ public class ValidatorException extends CertificateException {
|
||||
super(msg);
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public ValidatorException(String msg, Throwable cause) {
|
||||
super(msg);
|
||||
initCause(cause);
|
||||
@ -85,8 +86,9 @@ public class ValidatorException extends CertificateException {
|
||||
this.cert = cert;
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public ValidatorException(Object type, X509Certificate cert,
|
||||
Throwable cause) {
|
||||
Throwable cause) {
|
||||
this(type, cert);
|
||||
initCause(cause);
|
||||
}
|
||||
@ -97,6 +99,7 @@ public class ValidatorException extends CertificateException {
|
||||
this.cert = cert;
|
||||
}
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public ValidatorException(String msg, Object type, X509Certificate cert,
|
||||
Throwable cause) {
|
||||
this(msg, type, cert);
|
||||
|
@ -123,6 +123,7 @@ public class AlgorithmId implements Serializable, DerEncoder {
|
||||
* @param oid the identifier for the algorithm.
|
||||
* @param params the associated algorithm parameters, can be null.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public AlgorithmId(ObjectIdentifier oid, DerValue params)
|
||||
throws IOException {
|
||||
this.algid = oid;
|
||||
|
@ -52,6 +52,7 @@ public class GeneralNames {
|
||||
* @param derVal the DerValue to construct the GeneralNames from.
|
||||
* @exception IOException on error.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GeneralNames(DerValue derVal) throws IOException {
|
||||
this();
|
||||
if (derVal.tag != DerValue.tag_Sequence) {
|
||||
|
@ -70,6 +70,7 @@ public class GeneralSubtrees implements Cloneable, DerEncoder {
|
||||
*
|
||||
* @param val the DER encoded form of the same.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public GeneralSubtrees(DerValue val) throws IOException {
|
||||
this();
|
||||
if (val.tag != DerValue.tag_Sequence) {
|
||||
|
@ -50,6 +50,7 @@ public class RFC822Name implements GeneralNameInterface
|
||||
* @param derValue the encoded DER RFC822Name.
|
||||
* @exception IOException on error.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public RFC822Name(DerValue derValue) throws IOException {
|
||||
name = derValue.getIA5String();
|
||||
parseName(name);
|
||||
@ -61,6 +62,7 @@ public class RFC822Name implements GeneralNameInterface
|
||||
* @param name the RFC822Name.
|
||||
* @throws IOException on invalid input name
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public RFC822Name(String name) throws IOException {
|
||||
parseName(name);
|
||||
this.name = name;
|
||||
|
@ -125,6 +125,7 @@ public class X509CRLImpl extends X509CRL implements DerEncoder {
|
||||
*
|
||||
* @exception CRLException on parsing/construction errors.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TBSCertList(X500Name issuer, Date thisDate, Date nextDate,
|
||||
X509CRLEntry[] badCerts)
|
||||
throws CRLException
|
||||
@ -175,6 +176,7 @@ public class X509CRLImpl extends X509CRL implements DerEncoder {
|
||||
/**
|
||||
* Constructs from the encoding.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
public TBSCertList(DerValue value) throws IOException, CRLException {
|
||||
|
||||
if (value.tag != DerValue.tag_Sequence)
|
||||
|
@ -45,6 +45,7 @@ public class FallbackLocaleProviderAdapter extends JRELocaleProviderAdapter {
|
||||
/**
|
||||
* Fallback provider only provides the ROOT locale data.
|
||||
*/
|
||||
@SuppressWarnings("this-escape")
|
||||
private final LocaleResources rootLocaleResources =
|
||||
new LocaleResources(this, Locale.ROOT);
|
||||
|
||||
|
@ -74,6 +74,7 @@ public abstract class UnixFileSystemProvider
|
||||
private static final byte[] EMPTY_PATH = new byte[0];
|
||||
private final UnixFileSystem theFileSystem;
|
||||
|
||||
@SuppressWarnings("this-escape")
|
||||
public UnixFileSystemProvider() {
|
||||
theFileSystem = newFileSystem(StaticProperty.userDir());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user