mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base
Minor coding style update of javadoc tag in any file in java.base Reviewed-by: bchristi, lancea
This commit is contained in:
parent
13d0bac294
commit
d15a57b842
139 changed files with 3499 additions and 3499 deletions
|
@ -41,14 +41,14 @@ class AbstractMethodError extends IncompatibleClassChangeError {
|
|||
private static final long serialVersionUID = -1654391082989018462L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>AbstractMethodError</code> with no detail message.
|
||||
* Constructs an {@code AbstractMethodError} with no detail message.
|
||||
*/
|
||||
public AbstractMethodError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>AbstractMethodError</code> with the specified
|
||||
* Constructs an {@code AbstractMethodError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -28,7 +28,7 @@ package java.lang;
|
|||
/**
|
||||
* Thrown to indicate that an attempt has been made to store the
|
||||
* wrong type of object into an array of objects. For example, the
|
||||
* following code generates an <code>ArrayStoreException</code>:
|
||||
* following code generates an {@code ArrayStoreException}:
|
||||
* <blockquote><pre>
|
||||
* Object x[] = new String[3];
|
||||
* x[0] = new Integer(0);
|
||||
|
@ -43,14 +43,14 @@ class ArrayStoreException extends RuntimeException {
|
|||
private static final long serialVersionUID = -4522193890499838241L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>ArrayStoreException</code> with no detail message.
|
||||
* Constructs an {@code ArrayStoreException} with no detail message.
|
||||
*/
|
||||
public ArrayStoreException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>ArrayStoreException</code> with the specified
|
||||
* Constructs an {@code ArrayStoreException} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -79,7 +79,7 @@ public class AssertionError extends Error {
|
|||
|
||||
/**
|
||||
* Constructs an AssertionError with its detail message derived
|
||||
* from the specified <code>boolean</code>, which is converted to
|
||||
* from the specified {@code boolean}, which is converted to
|
||||
* a string as defined in section 15.18.1.1 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
|
@ -91,7 +91,7 @@ public class AssertionError extends Error {
|
|||
|
||||
/**
|
||||
* Constructs an AssertionError with its detail message derived
|
||||
* from the specified <code>char</code>, which is converted to a
|
||||
* from the specified {@code char}, which is converted to a
|
||||
* string as defined in section 15.18.1.1 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
|
@ -103,7 +103,7 @@ public class AssertionError extends Error {
|
|||
|
||||
/**
|
||||
* Constructs an AssertionError with its detail message derived
|
||||
* from the specified <code>int</code>, which is converted to a
|
||||
* from the specified {@code int}, which is converted to a
|
||||
* string as defined in section 15.18.1.1 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
|
@ -115,7 +115,7 @@ public class AssertionError extends Error {
|
|||
|
||||
/**
|
||||
* Constructs an AssertionError with its detail message derived
|
||||
* from the specified <code>long</code>, which is converted to a
|
||||
* from the specified {@code long}, which is converted to a
|
||||
* string as defined in section 15.18.1.1 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
|
@ -127,7 +127,7 @@ public class AssertionError extends Error {
|
|||
|
||||
/**
|
||||
* Constructs an AssertionError with its detail message derived
|
||||
* from the specified <code>float</code>, which is converted to a
|
||||
* from the specified {@code float}, which is converted to a
|
||||
* string as defined in section 15.18.1.1 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
|
@ -139,7 +139,7 @@ public class AssertionError extends Error {
|
|||
|
||||
/**
|
||||
* Constructs an AssertionError with its detail message derived
|
||||
* from the specified <code>double</code>, which is converted to a
|
||||
* from the specified {@code double}, which is converted to a
|
||||
* string as defined in section 15.18.1.1 of
|
||||
* <cite>The Java™ Language Specification</cite>.
|
||||
*
|
||||
|
|
|
@ -28,7 +28,7 @@ package java.lang;
|
|||
/**
|
||||
* Thrown to indicate that the code has attempted to cast an object
|
||||
* to a subclass of which it is not an instance. For example, the
|
||||
* following code generates a <code>ClassCastException</code>:
|
||||
* following code generates a {@code ClassCastException}:
|
||||
* <blockquote><pre>
|
||||
* Object x = new Integer(0);
|
||||
* System.out.println((String)x);
|
||||
|
@ -43,14 +43,14 @@ class ClassCastException extends RuntimeException {
|
|||
private static final long serialVersionUID = -9223365651070458532L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassCastException</code> with no detail message.
|
||||
* Constructs a {@code ClassCastException} with no detail message.
|
||||
*/
|
||||
public ClassCastException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassCastException</code> with the specified
|
||||
* Constructs a {@code ClassCastException} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -39,14 +39,14 @@ class ClassFormatError extends LinkageError {
|
|||
private static final long serialVersionUID = -8420114879011949195L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassFormatError</code> with no detail message.
|
||||
* Constructs a {@code ClassFormatError} with no detail message.
|
||||
*/
|
||||
public ClassFormatError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassFormatError</code> with the specified
|
||||
* Constructs a {@code ClassFormatError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -34,10 +34,10 @@ import java.io.ObjectStreamField;
|
|||
* Thrown when an application tries to load in a class through its
|
||||
* string name using:
|
||||
* <ul>
|
||||
* <li>The <code>forName</code> method in class <code>Class</code>.
|
||||
* <li>The <code>findSystemClass</code> method in class
|
||||
* <code>ClassLoader</code> .
|
||||
* <li>The <code>loadClass</code> method in class <code>ClassLoader</code>.
|
||||
* <li>The {@code forName} method in class {@code Class}.
|
||||
* <li>The {@code findSystemClass} method in class
|
||||
* {@code ClassLoader} .
|
||||
* <li>The {@code loadClass} method in class {@code ClassLoader}.
|
||||
* </ul>
|
||||
* <p>
|
||||
* but no definition for the class with the specified name could be found.
|
||||
|
@ -63,14 +63,14 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
private static final long serialVersionUID = 9176873029745254542L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassNotFoundException</code> with no detail message.
|
||||
* Constructs a {@code ClassNotFoundException} with no detail message.
|
||||
*/
|
||||
public ClassNotFoundException() {
|
||||
super((Throwable)null); // Disallow initCause
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassNotFoundException</code> with the
|
||||
* Constructs a {@code ClassNotFoundException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
@ -80,7 +80,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ClassNotFoundException</code> with the
|
||||
* Constructs a {@code ClassNotFoundException} with the
|
||||
* specified detail message and optional exception that was
|
||||
* raised while loading the class.
|
||||
*
|
||||
|
@ -100,7 +100,7 @@ public class ClassNotFoundException extends ReflectiveOperationException {
|
|||
* The {@link Throwable#getCause()} method is now the preferred means of
|
||||
* obtaining this information.
|
||||
*
|
||||
* @return the <code>Exception</code> that was raised while loading a class
|
||||
* @return the {@code Exception} that was raised while loading a class
|
||||
* @since 1.2
|
||||
*/
|
||||
public Throwable getException() {
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
package java.lang;
|
||||
|
||||
/**
|
||||
* Thrown to indicate that the <code>clone</code> method in class
|
||||
* <code>Object</code> has been called to clone an object, but that
|
||||
* the object's class does not implement the <code>Cloneable</code>
|
||||
* Thrown to indicate that the {@code clone} method in class
|
||||
* {@code Object} has been called to clone an object, but that
|
||||
* the object's class does not implement the {@code Cloneable}
|
||||
* interface.
|
||||
* <p>
|
||||
* Applications that override the <code>clone</code> method can also
|
||||
* Applications that override the {@code clone} method can also
|
||||
* throw this exception to indicate that an object could not or
|
||||
* should not be cloned.
|
||||
*
|
||||
|
@ -47,7 +47,7 @@ class CloneNotSupportedException extends Exception {
|
|||
private static final long serialVersionUID = 5195511250079656443L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>CloneNotSupportedException</code> with no
|
||||
* Constructs a {@code CloneNotSupportedException} with no
|
||||
* detail message.
|
||||
*/
|
||||
public CloneNotSupportedException() {
|
||||
|
@ -55,7 +55,7 @@ class CloneNotSupportedException extends Exception {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>CloneNotSupportedException</code> with the
|
||||
* Constructs a {@code CloneNotSupportedException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -26,14 +26,14 @@
|
|||
package java.lang;
|
||||
|
||||
/**
|
||||
* A class implements the <code>Cloneable</code> interface to
|
||||
* A class implements the {@code Cloneable} interface to
|
||||
* indicate to the {@link java.lang.Object#clone()} method that it
|
||||
* is legal for that method to make a
|
||||
* field-for-field copy of instances of that class.
|
||||
* <p>
|
||||
* Invoking Object's clone method on an instance that does not implement the
|
||||
* <code>Cloneable</code> interface results in the exception
|
||||
* <code>CloneNotSupportedException</code> being thrown.
|
||||
* {@code Cloneable} interface results in the exception
|
||||
* {@code CloneNotSupportedException} being thrown.
|
||||
* <p>
|
||||
* By convention, classes that implement this interface should override
|
||||
* {@code Object.clone} (which is protected) with a public method.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, 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
|
||||
|
@ -34,15 +34,15 @@ import sun.text.Normalizer;
|
|||
|
||||
|
||||
/**
|
||||
* This is a utility class for <code>String.toLowerCase()</code> and
|
||||
* <code>String.toUpperCase()</code>, that handles special casing with
|
||||
* This is a utility class for {@code String.toLowerCase()} and
|
||||
* {@code String.toUpperCase()}, that handles special casing with
|
||||
* conditions. In other words, it handles the mappings with conditions
|
||||
* that are defined in
|
||||
* <a href="http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt">Special
|
||||
* Casing Properties</a> file.
|
||||
* <p>
|
||||
* Note that the unconditional case mappings (including 1:M mappings)
|
||||
* are handled in <code>Character.toLower/UpperCase()</code>.
|
||||
* are handled in {@code Character.toLower/UpperCase()}.
|
||||
*/
|
||||
final class ConditionalSpecialCasing {
|
||||
|
||||
|
@ -329,7 +329,7 @@ final class ConditionalSpecialCasing {
|
|||
/**
|
||||
* Implements the "Before_Dot" condition
|
||||
*
|
||||
* Specification: C is followed by <code>U+0307 COMBINING DOT ABOVE</code>.
|
||||
* Specification: C is followed by {@code U+0307 COMBINING DOT ABOVE}.
|
||||
* Any sequence of characters with a combining class that is
|
||||
* neither 0 nor 230 may intervene between the current character
|
||||
* and the combining dot above.
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.io.ObjectStreamField;
|
|||
|
||||
/**
|
||||
* Signals that an unexpected exception has occurred in a static initializer.
|
||||
* An <code>ExceptionInInitializerError</code> is thrown to indicate that an
|
||||
* An {@code ExceptionInInitializerError} is thrown to indicate that an
|
||||
* exception occurred during evaluation of a static initializer or the
|
||||
* initializer for a static variable.
|
||||
*
|
||||
|
@ -54,8 +54,8 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
private static final long serialVersionUID = 1521711792217232256L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>ExceptionInInitializerError</code> with
|
||||
* <code>null</code> as its detail message string and with no saved
|
||||
* Constructs an {@code ExceptionInInitializerError} with
|
||||
* {@code null} as its detail message string and with no saved
|
||||
* throwable object.
|
||||
* A detail message is a String that describes this particular exception.
|
||||
*/
|
||||
|
@ -64,10 +64,10 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs a new <code>ExceptionInInitializerError</code> class by
|
||||
* saving a reference to the <code>Throwable</code> object thrown for
|
||||
* Constructs a new {@code ExceptionInInitializerError} class by
|
||||
* saving a reference to the {@code Throwable} object thrown for
|
||||
* later retrieval by the {@link #getException()} method. The detail
|
||||
* message string is set to <code>null</code>.
|
||||
* message string is set to {@code null}.
|
||||
*
|
||||
* @param thrown The exception thrown
|
||||
*/
|
||||
|
@ -97,8 +97,8 @@ public class ExceptionInInitializerError extends LinkageError {
|
|||
* obtaining this information.
|
||||
*
|
||||
* @return the saved throwable object of this
|
||||
* <code>ExceptionInInitializerError</code>, or <code>null</code>
|
||||
* if this <code>ExceptionInInitializerError</code> has no saved
|
||||
* {@code ExceptionInInitializerError}, or {@code null}
|
||||
* if this {@code ExceptionInInitializerError} has no saved
|
||||
* throwable object.
|
||||
*/
|
||||
public Throwable getException() {
|
||||
|
|
|
@ -41,14 +41,14 @@ public class IllegalAccessError extends IncompatibleClassChangeError {
|
|||
private static final long serialVersionUID = -8988904074992417891L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalAccessError</code> with no detail message.
|
||||
* Constructs an {@code IllegalAccessError} with no detail message.
|
||||
*/
|
||||
public IllegalAccessError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalAccessError</code> with the specified
|
||||
* Constructs an {@code IllegalAccessError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -60,7 +60,7 @@ public class IllegalAccessException extends ReflectiveOperationException {
|
|||
private static final long serialVersionUID = 6616958222490762034L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalAccessException</code> without a
|
||||
* Constructs an {@code IllegalAccessException} without a
|
||||
* detail message.
|
||||
*/
|
||||
public IllegalAccessException() {
|
||||
|
@ -68,7 +68,7 @@ public class IllegalAccessException extends ReflectiveOperationException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalAccessException</code> with a detail message.
|
||||
* Constructs an {@code IllegalAccessException} with a detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
*/
|
||||
|
|
|
@ -35,7 +35,7 @@ package java.lang;
|
|||
public
|
||||
class IllegalArgumentException extends RuntimeException {
|
||||
/**
|
||||
* Constructs an <code>IllegalArgumentException</code> with no
|
||||
* Constructs an {@code IllegalArgumentException} with no
|
||||
* detail message.
|
||||
*/
|
||||
public IllegalArgumentException() {
|
||||
|
@ -43,7 +43,7 @@ class IllegalArgumentException extends RuntimeException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalArgumentException</code> with the
|
||||
* Constructs an {@code IllegalArgumentException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
@ -56,7 +56,7 @@ class IllegalArgumentException extends RuntimeException {
|
|||
* Constructs a new exception with the specified detail message and
|
||||
* cause.
|
||||
*
|
||||
* <p>Note that the detail message associated with <code>cause</code> is
|
||||
* <p>Note that the detail message associated with {@code cause} is
|
||||
* <i>not</i> automatically incorporated in this exception's detail
|
||||
* message.
|
||||
*
|
||||
|
|
|
@ -44,7 +44,7 @@ class IllegalMonitorStateException extends RuntimeException {
|
|||
private static final long serialVersionUID = 3713306369498869069L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalMonitorStateException</code> with no
|
||||
* Constructs an {@code IllegalMonitorStateException} with no
|
||||
* detail message.
|
||||
*/
|
||||
public IllegalMonitorStateException() {
|
||||
|
@ -52,7 +52,7 @@ class IllegalMonitorStateException extends RuntimeException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalMonitorStateException</code> with the
|
||||
* Constructs an {@code IllegalMonitorStateException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -59,7 +59,7 @@ class IllegalStateException extends RuntimeException {
|
|||
* Constructs a new exception with the specified detail message and
|
||||
* cause.
|
||||
*
|
||||
* <p>Note that the detail message associated with <code>cause</code> is
|
||||
* <p>Note that the detail message associated with {@code cause} is
|
||||
* <i>not</i> automatically incorporated in this exception's detail
|
||||
* message.
|
||||
*
|
||||
|
|
|
@ -28,8 +28,8 @@ package java.lang;
|
|||
/**
|
||||
* Thrown to indicate that a thread is not in an appropriate state
|
||||
* for the requested operation. See, for example, the
|
||||
* <code>suspend</code> and <code>resume</code> methods in class
|
||||
* <code>Thread</code>.
|
||||
* {@code suspend} and {@code resume} methods in class
|
||||
* {@code Thread}.
|
||||
*
|
||||
* @author unascribed
|
||||
* @see java.lang.Thread#resume()
|
||||
|
@ -41,7 +41,7 @@ public class IllegalThreadStateException extends IllegalArgumentException {
|
|||
private static final long serialVersionUID = -7626246362397460174L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalThreadStateException</code> with no
|
||||
* Constructs an {@code IllegalThreadStateException} with no
|
||||
* detail message.
|
||||
*/
|
||||
public IllegalThreadStateException() {
|
||||
|
@ -49,7 +49,7 @@ public class IllegalThreadStateException extends IllegalArgumentException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>IllegalThreadStateException</code> with the
|
||||
* Constructs an {@code IllegalThreadStateException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -39,7 +39,7 @@ class IncompatibleClassChangeError extends LinkageError {
|
|||
private static final long serialVersionUID = -4914975503642802119L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>IncompatibleClassChangeError</code> with no
|
||||
* Constructs an {@code IncompatibleClassChangeError} with no
|
||||
* detail message.
|
||||
*/
|
||||
public IncompatibleClassChangeError () {
|
||||
|
@ -47,7 +47,7 @@ class IncompatibleClassChangeError extends LinkageError {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>IncompatibleClassChangeError</code> with the
|
||||
* Constructs an {@code IncompatibleClassChangeError} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
package java.lang;
|
||||
|
||||
/**
|
||||
* Thrown when an application tries to use the Java <code>new</code>
|
||||
* Thrown when an application tries to use the Java {@code new}
|
||||
* construct to instantiate an abstract class or an interface.
|
||||
* <p>
|
||||
* Normally, this error is caught by the compiler; this error can
|
||||
|
@ -44,14 +44,14 @@ class InstantiationError extends IncompatibleClassChangeError {
|
|||
private static final long serialVersionUID = -4885810657349421204L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>InstantiationError</code> with no detail message.
|
||||
* Constructs an {@code InstantiationError} with no detail message.
|
||||
*/
|
||||
public InstantiationError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>InstantiationError</code> with the specified
|
||||
* Constructs an {@code InstantiationError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2019, 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
|
||||
|
@ -36,14 +36,14 @@ public class InternalError extends VirtualMachineError {
|
|||
private static final long serialVersionUID = -9062593416125562365L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>InternalError</code> with no detail message.
|
||||
* Constructs an {@code InternalError} with no detail message.
|
||||
*/
|
||||
public InternalError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>InternalError</code> with the specified
|
||||
* Constructs an {@code InternalError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param message the detail message.
|
||||
|
|
|
@ -52,14 +52,14 @@ class InterruptedException extends Exception {
|
|||
private static final long serialVersionUID = 6700697376100628473L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>InterruptedException</code> with no detail message.
|
||||
* Constructs an {@code InterruptedException} with no detail message.
|
||||
*/
|
||||
public InterruptedException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>InterruptedException</code> with the
|
||||
* Constructs an {@code InterruptedException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -37,7 +37,7 @@ class NegativeArraySizeException extends RuntimeException {
|
|||
private static final long serialVersionUID = -8960118058596991861L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>NegativeArraySizeException</code> with no
|
||||
* Constructs a {@code NegativeArraySizeException} with no
|
||||
* detail message.
|
||||
*/
|
||||
public NegativeArraySizeException() {
|
||||
|
@ -45,7 +45,7 @@ class NegativeArraySizeException extends RuntimeException {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NegativeArraySizeException</code> with the
|
||||
* Constructs a {@code NegativeArraySizeException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
package java.lang;
|
||||
|
||||
/**
|
||||
* Thrown if the Java Virtual Machine or a <code>ClassLoader</code> instance
|
||||
* Thrown if the Java Virtual Machine or a {@code ClassLoader} instance
|
||||
* tries to load in the definition of a class (as part of a normal method call
|
||||
* or as part of creating a new instance using the <code>new</code> expression)
|
||||
* or as part of creating a new instance using the {@code new} expression)
|
||||
* and no definition of the class could be found.
|
||||
* <p>
|
||||
* The searched-for class definition existed when the currently
|
||||
|
@ -44,14 +44,14 @@ class NoClassDefFoundError extends LinkageError {
|
|||
private static final long serialVersionUID = 9095859863287012458L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoClassDefFoundError</code> with no detail message.
|
||||
* Constructs a {@code NoClassDefFoundError} with no detail message.
|
||||
*/
|
||||
public NoClassDefFoundError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoClassDefFoundError</code> with the specified
|
||||
* Constructs a {@code NoClassDefFoundError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -42,14 +42,14 @@ class NoSuchFieldError extends IncompatibleClassChangeError {
|
|||
private static final long serialVersionUID = -3456430195886129035L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoSuchFieldError</code> with no detail message.
|
||||
* Constructs a {@code NoSuchFieldError} with no detail message.
|
||||
*/
|
||||
public NoSuchFieldError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoSuchFieldError</code> with the specified
|
||||
* Constructs a {@code NoSuchFieldError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -43,14 +43,14 @@ class NoSuchMethodError extends IncompatibleClassChangeError {
|
|||
private static final long serialVersionUID = -3765521442372831335L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoSuchMethodError</code> with no detail message.
|
||||
* Constructs a {@code NoSuchMethodError} with no detail message.
|
||||
*/
|
||||
public NoSuchMethodError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoSuchMethodError</code> with the
|
||||
* Constructs a {@code NoSuchMethodError} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -37,14 +37,14 @@ class NoSuchMethodException extends ReflectiveOperationException {
|
|||
private static final long serialVersionUID = 5034388446362600923L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoSuchMethodException</code> without a detail message.
|
||||
* Constructs a {@code NoSuchMethodException} without a detail message.
|
||||
*/
|
||||
public NoSuchMethodException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NoSuchMethodException</code> with a detail message.
|
||||
* Constructs a {@code NoSuchMethodException} with a detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
*/
|
||||
|
|
|
@ -40,14 +40,14 @@ class NumberFormatException extends IllegalArgumentException {
|
|||
static final long serialVersionUID = -2848938806368998894L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>NumberFormatException</code> with no detail message.
|
||||
* Constructs a {@code NumberFormatException} with no detail message.
|
||||
*/
|
||||
public NumberFormatException () {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>NumberFormatException</code> with the
|
||||
* Constructs a {@code NumberFormatException} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -26,23 +26,23 @@
|
|||
package java.lang;
|
||||
|
||||
/**
|
||||
* The <code>Runnable</code> interface should be implemented by any
|
||||
* The {@code Runnable} interface should be implemented by any
|
||||
* class whose instances are intended to be executed by a thread. The
|
||||
* class must define a method of no arguments called <code>run</code>.
|
||||
* class must define a method of no arguments called {@code run}.
|
||||
* <p>
|
||||
* This interface is designed to provide a common protocol for objects that
|
||||
* wish to execute code while they are active. For example,
|
||||
* <code>Runnable</code> is implemented by class <code>Thread</code>.
|
||||
* {@code Runnable} is implemented by class {@code Thread}.
|
||||
* Being active simply means that a thread has been started and has not
|
||||
* yet been stopped.
|
||||
* <p>
|
||||
* In addition, <code>Runnable</code> provides the means for a class to be
|
||||
* active while not subclassing <code>Thread</code>. A class that implements
|
||||
* <code>Runnable</code> can run without subclassing <code>Thread</code>
|
||||
* by instantiating a <code>Thread</code> instance and passing itself in
|
||||
* as the target. In most cases, the <code>Runnable</code> interface should
|
||||
* be used if you are only planning to override the <code>run()</code>
|
||||
* method and no other <code>Thread</code> methods.
|
||||
* In addition, {@code Runnable} provides the means for a class to be
|
||||
* active while not subclassing {@code Thread}. A class that implements
|
||||
* {@code Runnable} can run without subclassing {@code Thread}
|
||||
* by instantiating a {@code Thread} instance and passing itself in
|
||||
* as the target. In most cases, the {@code Runnable} interface should
|
||||
* be used if you are only planning to override the {@code run()}
|
||||
* method and no other {@code Thread} methods.
|
||||
* This is important because classes should not be subclassed
|
||||
* unless the programmer intends on modifying or enhancing the fundamental
|
||||
* behavior of the class.
|
||||
|
@ -55,12 +55,12 @@ package java.lang;
|
|||
@FunctionalInterface
|
||||
public interface Runnable {
|
||||
/**
|
||||
* When an object implementing interface <code>Runnable</code> is used
|
||||
* When an object implementing interface {@code Runnable} is used
|
||||
* to create a thread, starting the thread causes the object's
|
||||
* <code>run</code> method to be called in that separately executing
|
||||
* {@code run} method to be called in that separately executing
|
||||
* thread.
|
||||
* <p>
|
||||
* The general contract of the method <code>run</code> is that it may
|
||||
* The general contract of the method {@code run} is that it may
|
||||
* take any action whatsoever.
|
||||
*
|
||||
* @see java.lang.Thread#run()
|
||||
|
|
|
@ -180,7 +180,7 @@ import java.lang.module.ModuleFinder;
|
|||
*
|
||||
* <tr>
|
||||
* <th scope="row">stopThread</th>
|
||||
* <td>Stopping of threads via calls to the Thread <code>stop</code>
|
||||
* <td>Stopping of threads via calls to the Thread {@code stop}
|
||||
* method</td>
|
||||
* <td>This allows code to stop any thread in the system provided that it is
|
||||
* already granted permission to access that thread.
|
||||
|
@ -191,9 +191,9 @@ import java.lang.module.ModuleFinder;
|
|||
* <tr>
|
||||
* <th scope="row">modifyThreadGroup</th>
|
||||
* <td>modification of thread groups, e.g., via calls to ThreadGroup
|
||||
* <code>destroy</code>, <code>getParent</code>, <code>resume</code>,
|
||||
* <code>setDaemon</code>, <code>setMaxPriority</code>, <code>stop</code>,
|
||||
* and <code>suspend</code> methods</td>
|
||||
* {@code destroy}, {@code getParent}, {@code resume},
|
||||
* {@code setDaemon}, {@code setMaxPriority}, {@code stop},
|
||||
* and {@code suspend} methods</td>
|
||||
* <td>This allows an attacker to create thread groups and
|
||||
* set their run priority.</td>
|
||||
* </tr>
|
||||
|
@ -246,8 +246,8 @@ import java.lang.module.ModuleFinder;
|
|||
* <tr>
|
||||
* <th scope="row">accessClassInPackage.{package name}</th>
|
||||
* <td>Access to the specified package via a class loader's
|
||||
* <code>loadClass</code> method when that class loader calls
|
||||
* the SecurityManager <code>checkPackageAccess</code> method</td>
|
||||
* {@code loadClass} method when that class loader calls
|
||||
* the SecurityManager {@code checkPackageAccess} method</td>
|
||||
* <td>This gives code access to classes in packages
|
||||
* to which it normally does not have access. Malicious code
|
||||
* may use these classes to help in its attempt to compromise
|
||||
|
@ -257,12 +257,12 @@ import java.lang.module.ModuleFinder;
|
|||
* <tr>
|
||||
* <th scope="row">defineClassInPackage.{package name}</th>
|
||||
* <td>Definition of classes in the specified package, via a class
|
||||
* loader's <code>defineClass</code> method when that class loader calls
|
||||
* the SecurityManager <code>checkPackageDefinition</code> method.</td>
|
||||
* loader's {@code defineClass} method when that class loader calls
|
||||
* the SecurityManager {@code checkPackageDefinition} method.</td>
|
||||
* <td>This grants code permission to define a class
|
||||
* in a particular package. This is dangerous because malicious
|
||||
* code with this permission may define rogue classes in
|
||||
* trusted packages like <code>java.security</code> or <code>java.lang</code>,
|
||||
* trusted packages like {@code java.security} or {@code java.lang},
|
||||
* for example.</td>
|
||||
* </tr>
|
||||
*
|
||||
|
@ -412,8 +412,8 @@ public final class RuntimePermission extends BasicPermission {
|
|||
*
|
||||
* @param name the name of the RuntimePermission.
|
||||
*
|
||||
* @throws NullPointerException if <code>name</code> is <code>null</code>.
|
||||
* @throws IllegalArgumentException if <code>name</code> is empty.
|
||||
* @throws NullPointerException if {@code name} is {@code null}.
|
||||
* @throws IllegalArgumentException if {@code name} is empty.
|
||||
*/
|
||||
|
||||
public RuntimePermission(String name)
|
||||
|
@ -429,8 +429,8 @@ public final class RuntimePermission extends BasicPermission {
|
|||
* @param name the name of the RuntimePermission.
|
||||
* @param actions should be null.
|
||||
*
|
||||
* @throws NullPointerException if <code>name</code> is <code>null</code>.
|
||||
* @throws IllegalArgumentException if <code>name</code> is empty.
|
||||
* @throws NullPointerException if {@code name} is {@code null}.
|
||||
* @throws IllegalArgumentException if {@code name} is empty.
|
||||
*/
|
||||
|
||||
public RuntimePermission(String name, String actions)
|
||||
|
|
|
@ -60,11 +60,11 @@ import sun.security.util.SecurityConstants;
|
|||
* operation to be performed. The
|
||||
* application can allow or disallow the operation.
|
||||
* <p>
|
||||
* The <code>SecurityManager</code> class contains many methods with
|
||||
* names that begin with the word <code>check</code>. These methods
|
||||
* The {@code SecurityManager} class contains many methods with
|
||||
* names that begin with the word {@code check}. These methods
|
||||
* are called by various methods in the Java libraries before those
|
||||
* methods perform certain potentially sensitive operations. The
|
||||
* invocation of such a <code>check</code> method typically looks like this:
|
||||
* invocation of such a {@code check} method typically looks like this:
|
||||
* <blockquote><pre>
|
||||
* SecurityManager security = System.getSecurityManager();
|
||||
* if (security != null) {
|
||||
|
@ -75,7 +75,7 @@ import sun.security.util.SecurityConstants;
|
|||
* The security manager is thereby given an opportunity to prevent
|
||||
* completion of the operation by throwing an exception. A security
|
||||
* manager routine simply returns if the operation is permitted, but
|
||||
* throws a <code>SecurityException</code> if the operation is not
|
||||
* throws a {@code SecurityException} if the operation is not
|
||||
* permitted.
|
||||
* <p>
|
||||
* Environments using a security manager will typically set the security
|
||||
|
@ -185,16 +185,16 @@ import sun.security.util.SecurityConstants;
|
|||
*
|
||||
* <p>
|
||||
* If a requested access is allowed,
|
||||
* <code>checkPermission</code> returns quietly. If denied, a
|
||||
* <code>SecurityException</code> is thrown.
|
||||
* {@code checkPermission} returns quietly. If denied, a
|
||||
* {@code SecurityException} is thrown.
|
||||
* <p>
|
||||
* The default implementation of each of the other
|
||||
* <code>check</code> methods in <code>SecurityManager</code> is to
|
||||
* call the <code>SecurityManager checkPermission</code> method
|
||||
* {@code check} methods in {@code SecurityManager} is to
|
||||
* call the {@code SecurityManager checkPermission} method
|
||||
* to determine if the calling thread has permission to perform the requested
|
||||
* operation.
|
||||
* <p>
|
||||
* Note that the <code>checkPermission</code> method with
|
||||
* Note that the {@code checkPermission} method with
|
||||
* just a single permission argument always performs security checks
|
||||
* within the context of the currently executing thread.
|
||||
* Sometimes a security check that should be made within a given context
|
||||
|
@ -205,7 +205,7 @@ import sun.security.util.SecurityConstants;
|
|||
* java.lang.Object) checkPermission}
|
||||
* method that includes a context argument are provided
|
||||
* for this situation. The
|
||||
* <code>getSecurityContext</code> method returns a "snapshot"
|
||||
* {@code getSecurityContext} method returns a "snapshot"
|
||||
* of the current calling context. (The default implementation
|
||||
* returns an AccessControlContext object.) A sample call is
|
||||
* the following:
|
||||
|
@ -217,14 +217,14 @@ import sun.security.util.SecurityConstants;
|
|||
* </pre>
|
||||
*
|
||||
* <p>
|
||||
* The <code>checkPermission</code> method
|
||||
* The {@code checkPermission} method
|
||||
* that takes a context object in addition to a permission
|
||||
* makes access decisions based on that context,
|
||||
* rather than on that of the current execution thread.
|
||||
* Code within a different context can thus call that method,
|
||||
* passing the permission and the
|
||||
* previously-saved context object. A sample call, using the
|
||||
* SecurityManager <code>sm</code> obtained as in the previous example,
|
||||
* SecurityManager {@code sm} obtained as in the previous example,
|
||||
* is the following:
|
||||
*
|
||||
* <pre>
|
||||
|
@ -234,21 +234,21 @@ import sun.security.util.SecurityConstants;
|
|||
* <p>Permissions fall into these categories: File, Socket, Net,
|
||||
* Security, Runtime, Property, AWT, Reflect, and Serializable.
|
||||
* The classes managing these various
|
||||
* permission categories are <code>java.io.FilePermission</code>,
|
||||
* <code>java.net.SocketPermission</code>,
|
||||
* <code>java.net.NetPermission</code>,
|
||||
* <code>java.security.SecurityPermission</code>,
|
||||
* <code>java.lang.RuntimePermission</code>,
|
||||
* <code>java.util.PropertyPermission</code>,
|
||||
* <code>java.awt.AWTPermission</code>,
|
||||
* <code>java.lang.reflect.ReflectPermission</code>, and
|
||||
* <code>java.io.SerializablePermission</code>.
|
||||
* permission categories are {@code java.io.FilePermission},
|
||||
* {@code java.net.SocketPermission},
|
||||
* {@code java.net.NetPermission},
|
||||
* {@code java.security.SecurityPermission},
|
||||
* {@code java.lang.RuntimePermission},
|
||||
* {@code java.util.PropertyPermission},
|
||||
* {@code java.awt.AWTPermission},
|
||||
* {@code java.lang.reflect.ReflectPermission}, and
|
||||
* {@code java.io.SerializablePermission}.
|
||||
*
|
||||
* <p>All but the first two (FilePermission and SocketPermission) are
|
||||
* subclasses of <code>java.security.BasicPermission</code>, which itself
|
||||
* subclasses of {@code java.security.BasicPermission}, which itself
|
||||
* is an abstract subclass of the
|
||||
* top-level class for permissions, which is
|
||||
* <code>java.security.Permission</code>. BasicPermission defines the
|
||||
* {@code java.security.Permission}. BasicPermission defines the
|
||||
* functionality needed for all permissions that contain a name
|
||||
* that follows the hierarchical property naming convention
|
||||
* (for example, "exitVM", "setFactory", "queuePrintJob", etc).
|
||||
|
@ -259,16 +259,16 @@ import sun.security.util.SecurityConstants;
|
|||
*
|
||||
* <p>FilePermission and SocketPermission are subclasses of the
|
||||
* top-level class for permissions
|
||||
* (<code>java.security.Permission</code>). Classes like these
|
||||
* ({@code java.security.Permission}). Classes like these
|
||||
* that have a more complicated name syntax than that used by
|
||||
* BasicPermission subclass directly from Permission rather than from
|
||||
* BasicPermission. For example,
|
||||
* for a <code>java.io.FilePermission</code> object, the permission name is
|
||||
* for a {@code java.io.FilePermission} object, the permission name is
|
||||
* the path name of a file (or directory).
|
||||
*
|
||||
* <p>Some of the permission classes have an "actions" list that tells
|
||||
* the actions that are permitted for the object. For example,
|
||||
* for a <code>java.io.FilePermission</code> object, the actions list
|
||||
* for a {@code java.io.FilePermission} object, the actions list
|
||||
* (such as "read, write") specifies which actions are granted for the
|
||||
* specified file (or for files in the specified directory).
|
||||
*
|
||||
|
@ -276,7 +276,7 @@ import sun.security.util.SecurityConstants;
|
|||
* ones that contain a name but no actions list; you either have the
|
||||
* named permission or you don't.
|
||||
*
|
||||
* <p>Note: There is also a <code>java.security.AllPermission</code>
|
||||
* <p>Note: There is also a {@code java.security.AllPermission}
|
||||
* permission that implies all permissions. It exists to simplify the work
|
||||
* of system administrators who might need to perform multiple
|
||||
* tasks that require all (or numerous) permissions.
|
||||
|
@ -285,7 +285,7 @@ import sun.security.util.SecurityConstants;
|
|||
* Permissions in the Java Development Kit (JDK)}
|
||||
* for permission-related information.
|
||||
* This document includes a table listing the various SecurityManager
|
||||
* <code>check</code> methods and the permission(s) the default
|
||||
* {@code check} methods and the permission(s) the default
|
||||
* implementation of each such method requires.
|
||||
* It also contains a table of the methods
|
||||
* that require permissions, and for each such method tells
|
||||
|
@ -322,17 +322,17 @@ public class SecurityManager {
|
|||
private boolean initialized = false;
|
||||
|
||||
/**
|
||||
* Constructs a new <code>SecurityManager</code>.
|
||||
* Constructs a new {@code SecurityManager}.
|
||||
*
|
||||
* <p> If there is a security manager already installed, this method first
|
||||
* calls the security manager's <code>checkPermission</code> method
|
||||
* with the <code>RuntimePermission("createSecurityManager")</code>
|
||||
* calls the security manager's {@code checkPermission} method
|
||||
* with the {@code RuntimePermission("createSecurityManager")}
|
||||
* permission to ensure the calling thread has permission to create a new
|
||||
* security manager.
|
||||
* This may result in throwing a <code>SecurityException</code>.
|
||||
* This may result in throwing a {@code SecurityException}.
|
||||
*
|
||||
* @throws java.lang.SecurityException if a security manager already
|
||||
* exists and its <code>checkPermission</code> method
|
||||
* exists and its {@code checkPermission} method
|
||||
* doesn't allow creation of a new security manager.
|
||||
* @see java.lang.System#getSecurityManager()
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
|
@ -355,8 +355,8 @@ public class SecurityManager {
|
|||
* Returns the current execution stack as an array of classes.
|
||||
* <p>
|
||||
* The length of the array is the number of methods on the execution
|
||||
* stack. The element at index <code>0</code> is the class of the
|
||||
* currently executing method, the element at index <code>1</code> is
|
||||
* stack. The element at index {@code 0} is the class of the
|
||||
* currently executing method, the element at index {@code 1} is
|
||||
* the class of that method's caller, and so on.
|
||||
*
|
||||
* @return the execution stack.
|
||||
|
@ -366,15 +366,15 @@ public class SecurityManager {
|
|||
/**
|
||||
* Creates an object that encapsulates the current execution
|
||||
* environment. The result of this method is used, for example, by the
|
||||
* three-argument <code>checkConnect</code> method and by the
|
||||
* two-argument <code>checkRead</code> method.
|
||||
* three-argument {@code checkConnect} method and by the
|
||||
* two-argument {@code checkRead} method.
|
||||
* These methods are needed because a trusted method may be called
|
||||
* on to read a file or open a socket on behalf of another method.
|
||||
* The trusted method needs to determine if the other (possibly
|
||||
* untrusted) method would be allowed to perform the operation on its
|
||||
* own.
|
||||
* <p> The default implementation of this method is to return
|
||||
* an <code>AccessControlContext</code> object.
|
||||
* an {@code AccessControlContext} object.
|
||||
*
|
||||
* @return an implementation-dependent object that encapsulates
|
||||
* sufficient information about the current execution environment
|
||||
|
@ -390,18 +390,18 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the requested
|
||||
* Throws a {@code SecurityException} if the requested
|
||||
* access, specified by the given permission, is not permitted based
|
||||
* on the security policy currently in effect.
|
||||
* <p>
|
||||
* This method calls <code>AccessController.checkPermission</code>
|
||||
* This method calls {@code AccessController.checkPermission}
|
||||
* with the given permission.
|
||||
*
|
||||
* @param perm the requested permission.
|
||||
* @throws SecurityException if access is not permitted based on
|
||||
* the current security policy.
|
||||
* @throws NullPointerException if the permission argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @since 1.2
|
||||
*/
|
||||
public void checkPermission(Permission perm) {
|
||||
|
@ -409,32 +409,32 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* specified security context is denied access to the resource
|
||||
* specified by the given permission.
|
||||
* The context must be a security
|
||||
* context returned by a previous call to
|
||||
* <code>getSecurityContext</code> and the access control
|
||||
* {@code getSecurityContext} and the access control
|
||||
* decision is based upon the configured security policy for
|
||||
* that security context.
|
||||
* <p>
|
||||
* If <code>context</code> is an instance of
|
||||
* <code>AccessControlContext</code> then the
|
||||
* <code>AccessControlContext.checkPermission</code> method is
|
||||
* If {@code context} is an instance of
|
||||
* {@code AccessControlContext} then the
|
||||
* {@code AccessControlContext.checkPermission} method is
|
||||
* invoked with the specified permission.
|
||||
* <p>
|
||||
* If <code>context</code> is not an instance of
|
||||
* <code>AccessControlContext</code> then a
|
||||
* <code>SecurityException</code> is thrown.
|
||||
* If {@code context} is not an instance of
|
||||
* {@code AccessControlContext} then a
|
||||
* {@code SecurityException} is thrown.
|
||||
*
|
||||
* @param perm the specified permission
|
||||
* @param context a system-dependent security context.
|
||||
* @throws SecurityException if the specified security context
|
||||
* is not an instance of <code>AccessControlContext</code>
|
||||
* (e.g., is <code>null</code>), or is denied access to the
|
||||
* is not an instance of {@code AccessControlContext}
|
||||
* (e.g., is {@code null}), or is denied access to the
|
||||
* resource specified by the given permission.
|
||||
* @throws NullPointerException if the permission argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @see java.lang.SecurityManager#getSecurityContext()
|
||||
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
|
||||
* @since 1.2
|
||||
|
@ -448,15 +448,15 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to create a new class loader.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("createClassLoader")</code>
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("createClassLoader")}
|
||||
* permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkCreateClassLoader</code>
|
||||
* {@code super.checkCreateClassLoader}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -486,31 +486,31 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to modify the thread argument.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager by the
|
||||
* <code>stop</code>, <code>suspend</code>, <code>resume</code>,
|
||||
* <code>setPriority</code>, <code>setName</code>, and
|
||||
* <code>setDaemon</code> methods of class <code>Thread</code>.
|
||||
* {@code stop}, {@code suspend}, {@code resume},
|
||||
* {@code setPriority}, {@code setName}, and
|
||||
* {@code setDaemon} methods of class {@code Thread}.
|
||||
* <p>
|
||||
* If the thread argument is a system thread (belongs to
|
||||
* the thread group with a <code>null</code> parent) then
|
||||
* this method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("modifyThread")</code> permission.
|
||||
* the thread group with a {@code null} parent) then
|
||||
* this method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("modifyThread")} permission.
|
||||
* If the thread argument is <i>not</i> a system thread,
|
||||
* this method just returns silently.
|
||||
* <p>
|
||||
* Applications that want a stricter policy should override this
|
||||
* method. If this method is overridden, the method that overrides
|
||||
* it should additionally check to see if the calling thread has the
|
||||
* <code>RuntimePermission("modifyThread")</code> permission, and
|
||||
* {@code RuntimePermission("modifyThread")} permission, and
|
||||
* if so, return silently. This is to ensure that code granted
|
||||
* that permission (such as the JDK itself) is allowed to
|
||||
* manipulate any thread.
|
||||
* <p>
|
||||
* If this method is overridden, then
|
||||
* <code>super.checkAccess</code> should
|
||||
* {@code super.checkAccess} should
|
||||
* be called by the first statement in the overridden method, or the
|
||||
* equivalent security check should be placed in the overridden method.
|
||||
*
|
||||
|
@ -518,7 +518,7 @@ public class SecurityManager {
|
|||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to modify the thread.
|
||||
* @throws NullPointerException if the thread argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @see java.lang.Thread#resume() resume
|
||||
* @see java.lang.Thread#setDaemon(boolean) setDaemon
|
||||
* @see java.lang.Thread#setName(java.lang.String) setName
|
||||
|
@ -538,32 +538,32 @@ public class SecurityManager {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to modify the thread group argument.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager when a
|
||||
* new child thread or child thread group is created, and by the
|
||||
* <code>setDaemon</code>, <code>setMaxPriority</code>,
|
||||
* <code>stop</code>, <code>suspend</code>, <code>resume</code>, and
|
||||
* <code>destroy</code> methods of class <code>ThreadGroup</code>.
|
||||
* {@code setDaemon}, {@code setMaxPriority},
|
||||
* {@code stop}, {@code suspend}, {@code resume}, and
|
||||
* {@code destroy} methods of class {@code ThreadGroup}.
|
||||
* <p>
|
||||
* If the thread group argument is the system thread group (
|
||||
* has a <code>null</code> parent) then
|
||||
* this method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("modifyThreadGroup")</code> permission.
|
||||
* has a {@code null} parent) then
|
||||
* this method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("modifyThreadGroup")} permission.
|
||||
* If the thread group argument is <i>not</i> the system thread group,
|
||||
* this method just returns silently.
|
||||
* <p>
|
||||
* Applications that want a stricter policy should override this
|
||||
* method. If this method is overridden, the method that overrides
|
||||
* it should additionally check to see if the calling thread has the
|
||||
* <code>RuntimePermission("modifyThreadGroup")</code> permission, and
|
||||
* {@code RuntimePermission("modifyThreadGroup")} permission, and
|
||||
* if so, return silently. This is to ensure that code granted
|
||||
* that permission (such as the JDK itself) is allowed to
|
||||
* manipulate any thread.
|
||||
* <p>
|
||||
* If this method is overridden, then
|
||||
* <code>super.checkAccess</code> should
|
||||
* {@code super.checkAccess} should
|
||||
* be called by the first statement in the overridden method, or the
|
||||
* equivalent security check should be placed in the overridden method.
|
||||
*
|
||||
|
@ -571,7 +571,7 @@ public class SecurityManager {
|
|||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to modify the thread group.
|
||||
* @throws NullPointerException if the thread group argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @see java.lang.ThreadGroup#destroy() destroy
|
||||
* @see java.lang.ThreadGroup#resume() resume
|
||||
* @see java.lang.ThreadGroup#setDaemon(boolean) setDaemon
|
||||
|
@ -592,20 +592,20 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to cause the Java Virtual Machine to
|
||||
* halt with the specified status code.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager by the
|
||||
* <code>exit</code> method of class <code>Runtime</code>. A status
|
||||
* of <code>0</code> indicates success; other values indicate various
|
||||
* {@code exit} method of class {@code Runtime}. A status
|
||||
* of {@code 0} indicates success; other values indicate various
|
||||
* errors.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("exitVM."+status)</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("exitVM."+status)} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkExit</code>
|
||||
* {@code super.checkExit}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -621,28 +621,28 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to create a subprocess.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager by the
|
||||
* <code>exec</code> methods of class <code>Runtime</code>.
|
||||
* {@code exec} methods of class {@code Runtime}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>FilePermission(cmd,"execute")</code> permission
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code FilePermission(cmd,"execute")} permission
|
||||
* if cmd is an absolute path, otherwise it calls
|
||||
* <code>checkPermission</code> with
|
||||
* {@code checkPermission} with
|
||||
* <code>FilePermission("<<ALL FILES>>","execute")</code>.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkExec</code>
|
||||
* {@code super.checkExec}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param cmd the specified system command.
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to create a subprocess.
|
||||
* @throws NullPointerException if the <code>cmd</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code cmd} argument is
|
||||
* {@code null}.
|
||||
* @see java.lang.Runtime#exec(java.lang.String)
|
||||
* @see java.lang.Runtime#exec(java.lang.String, java.lang.String[])
|
||||
* @see java.lang.Runtime#exec(java.lang.String[])
|
||||
|
@ -661,28 +661,28 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to dynamic link the library code
|
||||
* specified by the string argument file. The argument is either a
|
||||
* simple library name or a complete filename.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager by
|
||||
* methods <code>load</code> and <code>loadLibrary</code> of class
|
||||
* <code>Runtime</code>.
|
||||
* methods {@code load} and {@code loadLibrary} of class
|
||||
* {@code Runtime}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("loadLibrary."+lib)</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("loadLibrary."+lib)} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkLink</code>
|
||||
* {@code super.checkLink}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param lib the name of the library.
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to dynamically link the library.
|
||||
* @throws NullPointerException if the <code>lib</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code lib} argument is
|
||||
* {@code null}.
|
||||
* @see java.lang.Runtime#load(java.lang.String)
|
||||
* @see java.lang.Runtime#loadLibrary(java.lang.String)
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
|
@ -695,16 +695,16 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to read from the specified file
|
||||
* descriptor.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("readFileDescriptor")</code>
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("readFileDescriptor")}
|
||||
* permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkRead</code>
|
||||
* {@code super.checkRead}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -712,7 +712,7 @@ public class SecurityManager {
|
|||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to access the specified file descriptor.
|
||||
* @throws NullPointerException if the file descriptor argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @see java.io.FileDescriptor
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
|
@ -724,23 +724,23 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to read the file specified by the
|
||||
* string argument.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>FilePermission(file,"read")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code FilePermission(file,"read")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkRead</code>
|
||||
* {@code super.checkRead}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param file the system-dependent file name.
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to access the specified file.
|
||||
* @throws NullPointerException if the <code>file</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code file} argument is
|
||||
* {@code null}.
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
public void checkRead(String file) {
|
||||
|
@ -749,32 +749,32 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* specified security context is not allowed to read the file
|
||||
* specified by the string argument. The context must be a security
|
||||
* context returned by a previous call to
|
||||
* <code>getSecurityContext</code>.
|
||||
* <p> If <code>context</code> is an instance of
|
||||
* <code>AccessControlContext</code> then the
|
||||
* <code>AccessControlContext.checkPermission</code> method will
|
||||
* be invoked with the <code>FilePermission(file,"read")</code> permission.
|
||||
* <p> If <code>context</code> is not an instance of
|
||||
* <code>AccessControlContext</code> then a
|
||||
* <code>SecurityException</code> is thrown.
|
||||
* {@code getSecurityContext}.
|
||||
* <p> If {@code context} is an instance of
|
||||
* {@code AccessControlContext} then the
|
||||
* {@code AccessControlContext.checkPermission} method will
|
||||
* be invoked with the {@code FilePermission(file,"read")} permission.
|
||||
* <p> If {@code context} is not an instance of
|
||||
* {@code AccessControlContext} then a
|
||||
* {@code SecurityException} is thrown.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkRead</code>
|
||||
* {@code super.checkRead}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param file the system-dependent filename.
|
||||
* @param context a system-dependent security context.
|
||||
* @throws SecurityException if the specified security context
|
||||
* is not an instance of <code>AccessControlContext</code>
|
||||
* (e.g., is <code>null</code>), or does not have permission
|
||||
* is not an instance of {@code AccessControlContext}
|
||||
* (e.g., is {@code null}), or does not have permission
|
||||
* to read the specified file.
|
||||
* @throws NullPointerException if the <code>file</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code file} argument is
|
||||
* {@code null}.
|
||||
* @see java.lang.SecurityManager#getSecurityContext()
|
||||
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
|
||||
*/
|
||||
|
@ -785,16 +785,16 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to write to the specified file
|
||||
* descriptor.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("writeFileDescriptor")</code>
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("writeFileDescriptor")}
|
||||
* permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkWrite</code>
|
||||
* {@code super.checkWrite}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -802,7 +802,7 @@ public class SecurityManager {
|
|||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to access the specified file descriptor.
|
||||
* @throws NullPointerException if the file descriptor argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @see java.io.FileDescriptor
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
|
@ -815,23 +815,23 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to write to the file specified by
|
||||
* the string argument.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>FilePermission(file,"write")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code FilePermission(file,"write")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkWrite</code>
|
||||
* {@code super.checkWrite}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param file the system-dependent filename.
|
||||
* @throws SecurityException if the calling thread does not
|
||||
* have permission to access the specified file.
|
||||
* @throws NullPointerException if the <code>file</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code file} argument is
|
||||
* {@code null}.
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
public void checkWrite(String file) {
|
||||
|
@ -840,25 +840,25 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to delete the specified file.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager by the
|
||||
* <code>delete</code> method of class <code>File</code>.
|
||||
* {@code delete} method of class {@code File}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>FilePermission(file,"delete")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code FilePermission(file,"delete")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkDelete</code>
|
||||
* {@code super.checkDelete}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param file the system-dependent filename.
|
||||
* @throws SecurityException if the calling thread does not
|
||||
* have permission to delete the file.
|
||||
* @throws NullPointerException if the <code>file</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code file} argument is
|
||||
* {@code null}.
|
||||
* @see java.io.File#delete()
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
|
@ -868,22 +868,22 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to open a socket connection to the
|
||||
* specified host and port number.
|
||||
* <p>
|
||||
* A port number of <code>-1</code> indicates that the calling
|
||||
* A port number of {@code -1} indicates that the calling
|
||||
* method is attempting to determine the IP address of the specified
|
||||
* host name.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>SocketPermission(host+":"+port,"connect")</code> permission if
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code SocketPermission(host+":"+port,"connect")} permission if
|
||||
* the port is not equal to -1. If the port is equal to -1, then
|
||||
* it calls <code>checkPermission</code> with the
|
||||
* <code>SocketPermission(host,"resolve")</code> permission.
|
||||
* it calls {@code checkPermission} with the
|
||||
* {@code SocketPermission(host,"resolve")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkConnect</code>
|
||||
* {@code super.checkConnect}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -891,9 +891,9 @@ public class SecurityManager {
|
|||
* @param port the protocol port to connect to.
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to open a socket connection to the specified
|
||||
* <code>host</code> and <code>port</code>.
|
||||
* @throws NullPointerException if the <code>host</code> argument is
|
||||
* <code>null</code>.
|
||||
* {@code host} and {@code port}.
|
||||
* @throws NullPointerException if the {@code host} argument is
|
||||
* {@code null}.
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
public void checkConnect(String host, int port) {
|
||||
|
@ -913,28 +913,28 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* specified security context is not allowed to open a socket
|
||||
* connection to the specified host and port number.
|
||||
* <p>
|
||||
* A port number of <code>-1</code> indicates that the calling
|
||||
* A port number of {@code -1} indicates that the calling
|
||||
* method is attempting to determine the IP address of the specified
|
||||
* host name.
|
||||
* <p> If <code>context</code> is not an instance of
|
||||
* <code>AccessControlContext</code> then a
|
||||
* <code>SecurityException</code> is thrown.
|
||||
* <p> If {@code context} is not an instance of
|
||||
* {@code AccessControlContext} then a
|
||||
* {@code SecurityException} is thrown.
|
||||
* <p>
|
||||
* Otherwise, the port number is checked. If it is not equal
|
||||
* to -1, the <code>context</code>'s <code>checkPermission</code>
|
||||
* to -1, the {@code context}'s {@code checkPermission}
|
||||
* method is called with a
|
||||
* <code>SocketPermission(host+":"+port,"connect")</code> permission.
|
||||
* {@code SocketPermission(host+":"+port,"connect")} permission.
|
||||
* If the port is equal to -1, then
|
||||
* the <code>context</code>'s <code>checkPermission</code> method
|
||||
* the {@code context}'s {@code checkPermission} method
|
||||
* is called with a
|
||||
* <code>SocketPermission(host,"resolve")</code> permission.
|
||||
* {@code SocketPermission(host,"resolve")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkConnect</code>
|
||||
* {@code super.checkConnect}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -942,12 +942,12 @@ public class SecurityManager {
|
|||
* @param port the protocol port to connect to.
|
||||
* @param context a system-dependent security context.
|
||||
* @throws SecurityException if the specified security context
|
||||
* is not an instance of <code>AccessControlContext</code>
|
||||
* (e.g., is <code>null</code>), or does not have permission
|
||||
* is not an instance of {@code AccessControlContext}
|
||||
* (e.g., is {@code null}), or does not have permission
|
||||
* to open a socket connection to the specified
|
||||
* <code>host</code> and <code>port</code>.
|
||||
* @throws NullPointerException if the <code>host</code> argument is
|
||||
* <code>null</code>.
|
||||
* {@code host} and {@code port}.
|
||||
* @throws NullPointerException if the {@code host} argument is
|
||||
* {@code null}.
|
||||
* @see java.lang.SecurityManager#getSecurityContext()
|
||||
* @see java.security.AccessControlContext#checkPermission(java.security.Permission)
|
||||
*/
|
||||
|
@ -969,15 +969,15 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to wait for a connection request on
|
||||
* the specified local port number.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>SocketPermission("localhost:"+port,"listen")</code>.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code SocketPermission("localhost:"+port,"listen")}.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkListen</code>
|
||||
* {@code super.checkListen}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -992,18 +992,18 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not permitted to accept a socket connection from
|
||||
* the specified host and port number.
|
||||
* <p>
|
||||
* This method is invoked for the current security manager by the
|
||||
* <code>accept</code> method of class <code>ServerSocket</code>.
|
||||
* {@code accept} method of class {@code ServerSocket}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>SocketPermission(host+":"+port,"accept")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code SocketPermission(host+":"+port,"accept")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkAccept</code>
|
||||
* {@code super.checkAccept}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1011,8 +1011,8 @@ public class SecurityManager {
|
|||
* @param port the port number of the socket connection.
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to accept the connection.
|
||||
* @throws NullPointerException if the <code>host</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws NullPointerException if the {@code host} argument is
|
||||
* {@code null}.
|
||||
* @see java.net.ServerSocket#accept()
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
|
@ -1028,16 +1028,16 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to use
|
||||
* (join/leave/send/receive) IP multicast.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* This method calls {@code checkPermission} with the
|
||||
* <code>java.net.SocketPermission(maddr.getHostAddress(),
|
||||
* "accept,connect")</code> permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkMulticast</code>
|
||||
* {@code super.checkMulticast}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1045,7 +1045,7 @@ public class SecurityManager {
|
|||
* @throws SecurityException if the calling thread is not allowed to
|
||||
* use (join/leave/send/receive) IP multicast.
|
||||
* @throws NullPointerException if the address argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @since 1.1
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
|
@ -1059,16 +1059,16 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to use
|
||||
* (join/leave/send/receive) IP multicast.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* This method calls {@code checkPermission} with the
|
||||
* <code>java.net.SocketPermission(maddr.getHostAddress(),
|
||||
* "accept,connect")</code> permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkMulticast</code>
|
||||
* {@code super.checkMulticast}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1079,7 +1079,7 @@ public class SecurityManager {
|
|||
* @throws SecurityException if the calling thread is not allowed to
|
||||
* use (join/leave/send/receive) IP multicast.
|
||||
* @throws NullPointerException if the address argument is
|
||||
* <code>null</code>.
|
||||
* {@code null}.
|
||||
* @since 1.1
|
||||
* @deprecated Use #checkPermission(java.security.Permission) instead
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
|
@ -1095,18 +1095,18 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to access or modify the system
|
||||
* properties.
|
||||
* <p>
|
||||
* This method is used by the <code>getProperties</code> and
|
||||
* <code>setProperties</code> methods of class <code>System</code>.
|
||||
* This method is used by the {@code getProperties} and
|
||||
* {@code setProperties} methods of class {@code System}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>PropertyPermission("*", "read,write")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code PropertyPermission("*", "read,write")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkPropertiesAccess</code>
|
||||
* {@code super.checkPropertiesAccess}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1122,18 +1122,18 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to access the system property with
|
||||
* the specified <code>key</code> name.
|
||||
* the specified {@code key} name.
|
||||
* <p>
|
||||
* This method is used by the <code>getProperty</code> method of
|
||||
* class <code>System</code>.
|
||||
* This method is used by the {@code getProperty} method of
|
||||
* class {@code System}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>PropertyPermission(key, "read")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code PropertyPermission(key, "read")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkPropertyAccess</code>
|
||||
* {@code super.checkPropertyAccess}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1141,9 +1141,9 @@ public class SecurityManager {
|
|||
*
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission to access the specified system property.
|
||||
* @throws NullPointerException if the <code>key</code> argument is
|
||||
* <code>null</code>.
|
||||
* @throws IllegalArgumentException if <code>key</code> is empty.
|
||||
* @throws NullPointerException if the {@code key} argument is
|
||||
* {@code null}.
|
||||
* @throws IllegalArgumentException if {@code key} is empty.
|
||||
*
|
||||
* @see java.lang.System#getProperty(java.lang.String)
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
|
@ -1154,15 +1154,15 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to initiate a print job request.
|
||||
* <p>
|
||||
* This method calls
|
||||
* <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("queuePrintJob")</code> permission.
|
||||
* {@code checkPermission} with the
|
||||
* {@code RuntimePermission("queuePrintJob")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkPrintJobAccess</code>
|
||||
* {@code super.checkPrintJobAccess}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1461,16 +1461,16 @@ public class SecurityManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* Throws a {@code SecurityException} if the
|
||||
* calling thread is not allowed to set the socket factory used by
|
||||
* <code>ServerSocket</code> or <code>Socket</code>, or the stream
|
||||
* handler factory used by <code>URL</code>.
|
||||
* {@code ServerSocket} or {@code Socket}, or the stream
|
||||
* handler factory used by {@code URL}.
|
||||
* <p>
|
||||
* This method calls <code>checkPermission</code> with the
|
||||
* <code>RuntimePermission("setFactory")</code> permission.
|
||||
* This method calls {@code checkPermission} with the
|
||||
* {@code RuntimePermission("setFactory")} permission.
|
||||
* <p>
|
||||
* If you override this method, then you should make a call to
|
||||
* <code>super.checkSetFactory</code>
|
||||
* {@code super.checkSetFactory}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
|
@ -1494,8 +1494,8 @@ public class SecurityManager {
|
|||
* <p> If the requested permission is allowed, this method returns
|
||||
* quietly. If denied, a SecurityException is raised.
|
||||
*
|
||||
* <p> This method creates a <code>SecurityPermission</code> object for
|
||||
* the given permission target name and calls <code>checkPermission</code>
|
||||
* <p> This method creates a {@code SecurityPermission} object for
|
||||
* the given permission target name and calls {@code checkPermission}
|
||||
* with it.
|
||||
*
|
||||
* <p> See the documentation for
|
||||
|
@ -1503,16 +1503,16 @@ public class SecurityManager {
|
|||
* a list of possible permission target names.
|
||||
*
|
||||
* <p> If you override this method, then you should make a call to
|
||||
* <code>super.checkSecurityAccess</code>
|
||||
* {@code super.checkSecurityAccess}
|
||||
* at the point the overridden method would normally throw an
|
||||
* exception.
|
||||
*
|
||||
* @param target the target name of the <code>SecurityPermission</code>.
|
||||
* @param target the target name of the {@code SecurityPermission}.
|
||||
*
|
||||
* @throws SecurityException if the calling thread does not have
|
||||
* permission for the requested access.
|
||||
* @throws NullPointerException if <code>target</code> is null.
|
||||
* @throws IllegalArgumentException if <code>target</code> is empty.
|
||||
* @throws NullPointerException if {@code target} is null.
|
||||
* @throws IllegalArgumentException if {@code target} is empty.
|
||||
*
|
||||
* @since 1.1
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
|
|
|
@ -38,14 +38,14 @@ class StackOverflowError extends VirtualMachineError {
|
|||
private static final long serialVersionUID = 8609175038441759607L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>StackOverflowError</code> with no detail message.
|
||||
* Constructs a {@code StackOverflowError} with no detail message.
|
||||
*/
|
||||
public StackOverflowError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>StackOverflowError</code> with the specified
|
||||
* Constructs a {@code StackOverflowError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -38,14 +38,14 @@ class UnknownError extends VirtualMachineError {
|
|||
private static final long serialVersionUID = 2524784860676771849L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>UnknownError</code> with no detail message.
|
||||
* Constructs an {@code UnknownError} with no detail message.
|
||||
*/
|
||||
public UnknownError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>UnknownError</code> with the specified detail
|
||||
* Constructs an {@code UnknownError} with the specified detail
|
||||
* message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -27,7 +27,7 @@ package java.lang;
|
|||
|
||||
/**
|
||||
* Thrown if the Java Virtual Machine cannot find an appropriate
|
||||
* native-language definition of a method declared <code>native</code>.
|
||||
* native-language definition of a method declared {@code native}.
|
||||
*
|
||||
* @author unascribed
|
||||
* @see java.lang.Runtime
|
||||
|
@ -39,14 +39,14 @@ class UnsatisfiedLinkError extends LinkageError {
|
|||
private static final long serialVersionUID = -4019343241616879428L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>UnsatisfiedLinkError</code> with no detail message.
|
||||
* Constructs an {@code UnsatisfiedLinkError} with no detail message.
|
||||
*/
|
||||
public UnsatisfiedLinkError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>UnsatisfiedLinkError</code> with the
|
||||
* Constructs an {@code UnsatisfiedLinkError} with the
|
||||
* specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -38,7 +38,7 @@ class UnsupportedClassVersionError extends ClassFormatError {
|
|||
private static final long serialVersionUID = -7123279212883497373L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>UnsupportedClassVersionError</code>
|
||||
* Constructs a {@code UnsupportedClassVersionError}
|
||||
* with no detail message.
|
||||
*/
|
||||
public UnsupportedClassVersionError() {
|
||||
|
@ -46,7 +46,7 @@ class UnsupportedClassVersionError extends ClassFormatError {
|
|||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>UnsupportedClassVersionError</code> with
|
||||
* Constructs a {@code UnsupportedClassVersionError} with
|
||||
* the specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
|
|
|
@ -56,7 +56,7 @@ public class UnsupportedOperationException extends RuntimeException {
|
|||
* Constructs a new exception with the specified detail message and
|
||||
* cause.
|
||||
*
|
||||
* <p>Note that the detail message associated with <code>cause</code> is
|
||||
* <p>Note that the detail message associated with {@code cause} is
|
||||
* <i>not</i> automatically incorporated in this exception's detail
|
||||
* message.
|
||||
*
|
||||
|
|
|
@ -39,14 +39,14 @@ class VerifyError extends LinkageError {
|
|||
private static final long serialVersionUID = 7001962396098498785L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>VerifyError</code> with no detail message.
|
||||
* Constructs an {@code VerifyError} with no detail message.
|
||||
*/
|
||||
public VerifyError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>VerifyError</code> with the specified detail message.
|
||||
* Constructs an {@code VerifyError} with the specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
*/
|
||||
|
|
|
@ -38,14 +38,14 @@ public abstract class VirtualMachineError extends Error {
|
|||
private static final long serialVersionUID = 4161983926571568670L;
|
||||
|
||||
/**
|
||||
* Constructs a <code>VirtualMachineError</code> with no detail message.
|
||||
* Constructs a {@code VirtualMachineError} with no detail message.
|
||||
*/
|
||||
public VirtualMachineError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>VirtualMachineError</code> with the specified
|
||||
* Constructs a {@code VirtualMachineError} with the specified
|
||||
* detail message.
|
||||
*
|
||||
* @param message the detail message.
|
||||
|
|
|
@ -1042,7 +1042,7 @@ public class MethodHandles {
|
|||
* <td style="text-align:center">IAE</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>{@code ANY.in(X)}, for inaccessible <code>X</code></td>
|
||||
* <td>{@code ANY.in(X)}, for inaccessible {@code X}</td>
|
||||
* <td></td>
|
||||
* <td></td>
|
||||
* <td></td>
|
||||
|
|
|
@ -216,22 +216,22 @@
|
|||
* <tbody>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">*</th><td>
|
||||
* <ul style="list-style:none; padding-left: 0; margin:0">
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
|
||||
* <li><code>CallSite bootstrap(Object... args)</code>
|
||||
* <li><code>CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)</code>
|
||||
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)}
|
||||
* <li>{@code CallSite bootstrap(Object... args)}
|
||||
* <li>{@code CallSite bootstrap(Object caller, Object... nameAndTypeWithArgs)}
|
||||
* </ul></td></tr>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">0</th><td>
|
||||
* <ul style="list-style:none; padding-left: 0; margin:0">
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type)</code>
|
||||
* <li><code>CallSite bootstrap(Lookup caller, Object... nameAndType)</code>
|
||||
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type)}
|
||||
* <li>{@code CallSite bootstrap(Lookup caller, Object... nameAndType)}
|
||||
* </ul></td></tr>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">1</th><td>
|
||||
* <code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)</code></td></tr>
|
||||
* {@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object arg)}</td></tr>
|
||||
* <tr><th scope="row" style="font-weight:normal; vertical-align:top">2</th><td>
|
||||
* <ul style="list-style:none; padding-left: 0; margin:0">
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)</code>
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)</code>
|
||||
* <li><code>CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)</code>
|
||||
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, Object... args)}
|
||||
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, String... args)}
|
||||
* <li>{@code CallSite bootstrap(Lookup caller, String name, MethodType type, String x, int y)}
|
||||
* </ul></td></tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
|
|
@ -323,10 +323,10 @@ public abstract class Reference<T> {
|
|||
/**
|
||||
* Returns this reference object's referent. If this reference object has
|
||||
* been cleared, either by the program or by the garbage collector, then
|
||||
* this method returns <code>null</code>.
|
||||
* this method returns {@code null}.
|
||||
*
|
||||
* @return The object to which this reference refers, or
|
||||
* <code>null</code> if this reference object has been cleared
|
||||
* {@code null} if this reference object has been cleared
|
||||
*/
|
||||
@HotSpotIntrinsicCandidate
|
||||
public T get() {
|
||||
|
@ -350,9 +350,9 @@ public abstract class Reference<T> {
|
|||
* Tells whether or not this reference object has been enqueued, either by
|
||||
* the program or by the garbage collector. If this reference object was
|
||||
* not registered with a queue when it was created, then this method will
|
||||
* always return <code>false</code>.
|
||||
* always return {@code false}.
|
||||
*
|
||||
* @return <code>true</code> if and only if this reference object has
|
||||
* @return {@code true} if and only if this reference object has
|
||||
* been enqueued
|
||||
*/
|
||||
public boolean isEnqueued() {
|
||||
|
@ -366,8 +366,8 @@ public abstract class Reference<T> {
|
|||
* <p> This method is invoked only by Java code; when the garbage collector
|
||||
* enqueues references it does so directly, without invoking this method.
|
||||
*
|
||||
* @return <code>true</code> if this reference object was successfully
|
||||
* enqueued; <code>false</code> if it was already enqueued or if
|
||||
* @return {@code true} if this reference object was successfully
|
||||
* enqueued; {@code false} if it was already enqueued or if
|
||||
* it was not registered with a queue when it was created
|
||||
*/
|
||||
public boolean enqueue() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue