8255262: Remove use of legacy custom @spec tag

Reviewed-by: lancea, mr, iris, alanb, darcy, mchung
This commit is contained in:
Jonathan Gibbons 2020-10-22 19:42:01 +00:00
parent a0b687bfb2
commit 0aa3c92577
69 changed files with 0 additions and 209 deletions

View file

@ -1046,7 +1046,6 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
* if {@code start} or {@code end} are negative,
* if {@code end} is greater than {@code length()},
* or if {@code start} is greater than {@code end}
* @spec JSR-51
*/
@Override
public CharSequence subSequence(int start, int end) {

View file

@ -54,7 +54,6 @@ import java.util.stream.StreamSupport;
*
* @author Mike McCloskey
* @since 1.4
* @spec JSR-51
*/
public interface CharSequence {

View file

@ -520,7 +520,6 @@ public final class Class<T> implements java.io.Serializable,
* @jls 12.2 Loading of Classes and Interfaces
* @jls 12.3 Linking of Classes and Interfaces
* @since 9
* @spec JPMS
*/
@CallerSensitive
public static Class<?> forName(Module module, String name) {
@ -918,7 +917,6 @@ public final class Class<T> implements java.io.Serializable,
* @return the module that this class or interface is a member of
*
* @since 9
* @spec JPMS
*/
public Module getModule() {
return module;
@ -1034,7 +1032,6 @@ public final class Class<T> implements java.io.Serializable,
*
* @return the package of this class.
* @revised 9
* @spec JPMS
*/
public Package getPackage() {
if (isPrimitive() || isArray()) {
@ -1069,7 +1066,6 @@ public final class Class<T> implements java.io.Serializable,
* @return the fully qualified package name
*
* @since 9
* @spec JPMS
* @jls 6.7 Fully Qualified Names
*/
public String getPackageName() {
@ -2765,7 +2761,6 @@ public final class Class<T> implements java.io.Serializable,
* @see Module#getResourceAsStream(String)
* @since 1.1
* @revised 9
* @spec JPMS
*/
@CallerSensitive
public InputStream getResourceAsStream(String name) {
@ -2862,7 +2857,6 @@ public final class Class<T> implements java.io.Serializable,
* @throws NullPointerException If {@code name} is {@code null}
* @since 1.1
* @revised 9
* @spec JPMS
*/
@CallerSensitive
public URL getResource(String name) {

View file

@ -227,7 +227,6 @@ import sun.security.util.SecurityConstants;
* @see #resolveClass(Class)
* @since 1.0
* @revised 9
* @spec JPMS
*/
public abstract class ClassLoader {
@ -425,7 +424,6 @@ public abstract class ClassLoader {
* method doesn't allow creation of a new class loader.
*
* @since 9
* @spec JPMS
*/
protected ClassLoader(String name, ClassLoader parent) {
this(checkCreateClassLoader(name), name, parent);
@ -488,7 +486,6 @@ public abstract class ClassLoader {
* this class loader is not named.
*
* @since 9
* @spec JPMS
*/
public String getName() {
return name;
@ -743,7 +740,6 @@ public abstract class ClassLoader {
* if the class could not be found.
*
* @since 9
* @spec JPMS
*/
protected Class<?> findClass(String moduleName, String name) {
if (moduleName == null) {
@ -869,7 +865,6 @@ public abstract class ClassLoader {
*
* @since 1.1
* @revised 9
* @spec JPMS
*/
protected final Class<?> defineClass(String name, byte[] b, int off, int len)
throws ClassFormatError
@ -1005,7 +1000,6 @@ public abstract class ClassLoader {
* class loader or its ancestor.
*
* @revised 9
* @spec JPMS
*/
protected final Class<?> defineClass(String name, byte[] b, int off, int len,
ProtectionDomain protectionDomain)
@ -1081,7 +1075,6 @@ public abstract class ClassLoader {
*
* @since 1.5
* @revised 9
* @spec JPMS
*/
protected final Class<?> defineClass(String name, java.nio.ByteBuffer b,
ProtectionDomain protectionDomain)
@ -1344,7 +1337,6 @@ public abstract class ClassLoader {
*
* @see java.lang.module.ModuleReader#find(String)
* @since 9
* @spec JPMS
*/
protected URL findResource(String moduleName, String name) throws IOException {
if (moduleName == null) {
@ -1396,7 +1388,6 @@ public abstract class ClassLoader {
*
* @since 1.1
* @revised 9
* @spec JPMS
*/
public URL getResource(String name) {
Objects.requireNonNull(name);
@ -1462,7 +1453,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
public Enumeration<URL> getResources(String name) throws IOException {
Objects.requireNonNull(name);
@ -1561,7 +1551,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
protected URL findResource(String name) {
return null;
@ -1597,7 +1586,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
protected Enumeration<URL> findResources(String name) throws IOException {
return Collections.emptyEnumeration();
@ -1669,7 +1657,6 @@ public abstract class ClassLoader {
*
* @since 1.1
* @revised 9
* @spec JPMS
*/
public static URL getSystemResource(String name) {
return getSystemClassLoader().getResource(name);
@ -1706,7 +1693,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
public static Enumeration<URL> getSystemResources(String name)
throws IOException
@ -1739,7 +1725,6 @@ public abstract class ClassLoader {
*
* @since 1.1
* @revised 9
* @spec JPMS
*/
public InputStream getResourceAsStream(String name) {
Objects.requireNonNull(name);
@ -1773,7 +1758,6 @@ public abstract class ClassLoader {
*
* @since 1.1
* @revised 9
* @spec JPMS
*/
public static InputStream getSystemResourceAsStream(String name) {
URL url = getSystemResource(name);
@ -1824,7 +1808,6 @@ public abstract class ClassLoader {
*
* @see Module#isNamed()
* @since 9
* @spec JPMS
*/
public final Module getUnnamedModule() {
return unnamedModule;
@ -1848,7 +1831,6 @@ public abstract class ClassLoader {
* {@link RuntimePermission}{@code ("getClassLoader")}
*
* @since 9
* @spec JPMS
*/
@CallerSensitive
public static ClassLoader getPlatformClassLoader() {
@ -1936,7 +1918,6 @@ public abstract class ClassLoader {
*
* @revised 1.4
* @revised 9
* @spec JPMS
*/
@CallerSensitive
public static ClassLoader getSystemClassLoader() {
@ -2202,7 +2183,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*
* @jvms 5.3 Creation and Loading
* @see <a href="{@docRoot}/../specs/jar/jar.html#package-sealing">
@ -2241,7 +2221,6 @@ public abstract class ClassLoader {
* @jvms 5.3 Creation and Loading
*
* @since 9
* @spec JPMS
*/
public final Package getDefinedPackage(String name) {
Objects.requireNonNull(name, "name cannot be null");
@ -2268,7 +2247,6 @@ public abstract class ClassLoader {
* @jvms 5.3 Creation and Loading
*
* @since 9
* @spec JPMS
*/
public final Package[] getDefinedPackages() {
return packages().toArray(Package[]::new);
@ -2314,7 +2292,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
@Deprecated(since="9")
protected Package getPackage(String name) {
@ -2350,7 +2327,6 @@ public abstract class ClassLoader {
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
protected Package[] getPackages() {
Stream<Package> pkgs = packages();

View file

@ -29,7 +29,6 @@ package java.lang;
* Thrown to indicate that a method has been called by an inappropriate caller.
*
* @since 9
* @spec JPMS
* @see StackWalker#getCallerClass
*/
public class IllegalCallerException extends RuntimeException {

View file

@ -30,7 +30,6 @@ package java.lang;
*
* @see ModuleLayer
* @since 9
* @spec JPMS
*/
public class LayerInstantiationException extends RuntimeException {
@java.io.Serial

View file

@ -95,7 +95,6 @@ import sun.security.util.SecurityConstants;
* be thrown. </p>
*
* @since 9
* @spec JPMS
* @see Class#getModule()
*/

View file

@ -142,7 +142,6 @@ import sun.security.util.SecurityConstants;
* }</pre>
*
* @since 9
* @spec JPMS
* @see Module#getLayer()
*/
@ -193,7 +192,6 @@ public final class ModuleLayer {
* should never be shared with untrusted code.
*
* @since 9
* @spec JPMS
*/
public static final class Controller {
private final ModuleLayer layer;

View file

@ -115,7 +115,6 @@ import jdk.internal.reflect.Reflection;
*
* @since 1.2
* @revised 9
* @spec JPMS
*/
public class Package extends NamedPackage implements java.lang.reflect.AnnotatedElement {
/**
@ -214,7 +213,6 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* is returned if it is not known.
*
* @revised 9
* @spec JPMS
*/
public String getImplementationVendor() {
return versionInfo.implVendor;
@ -344,7 +342,6 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* @see ClassLoader#getDefinedPackage
*
* @revised 9
* @spec JPMS
*/
@CallerSensitive
@Deprecated(since="9")
@ -369,7 +366,6 @@ public class Package extends NamedPackage implements java.lang.reflect.Annotated
* @see ClassLoader#getDefinedPackages
*
* @revised 9
* @spec JPMS
*/
@CallerSensitive
public static Package[] getPackages() {

View file

@ -115,7 +115,6 @@ public final class StackTraceElement implements java.io.Serializable {
* {@code methodName} is null
* @since 1.5
* @revised 9
* @spec JPMS
*/
public StackTraceElement(String declaringClass, String methodName,
String fileName, int lineNumber) {
@ -152,7 +151,6 @@ public final class StackTraceElement implements java.io.Serializable {
* or {@code methodName} is {@code null}
*
* @since 9
* @spec JPMS
*/
public StackTraceElement(String classLoaderName,
String moduleName, String moduleVersion,
@ -212,7 +210,6 @@ public final class StackTraceElement implements java.io.Serializable {
* point represented by this stack trace element; {@code null}
* if the module name is not available.
* @since 9
* @spec JPMS
* @see Module#getName()
*/
public String getModuleName() {
@ -227,7 +224,6 @@ public final class StackTraceElement implements java.io.Serializable {
* point represented by this stack trace element; {@code null}
* if the module version is not available.
* @since 9
* @spec JPMS
* @see java.lang.module.ModuleDescriptor.Version
*/
public String getModuleVersion() {
@ -243,7 +239,6 @@ public final class StackTraceElement implements java.io.Serializable {
* if the class loader is not named.
*
* @since 9
* @spec JPMS
* @see java.lang.ClassLoader#getName()
*/
public String getClassLoaderName() {
@ -358,7 +353,6 @@ public final class StackTraceElement implements java.io.Serializable {
* choose to omit some element in the returned string.
*
* @revised 9
* @spec JPMS
* @see Throwable#printStackTrace()
*/
public String toString() {
@ -408,7 +402,6 @@ public final class StackTraceElement implements java.io.Serializable {
* execution point as this instance.
*
* @revised 9
* @spec JPMS
*/
public boolean equals(Object obj) {
if (obj==this)

View file

@ -1940,7 +1940,6 @@ public final class String
* or if {@code beginIndex} is greater than {@code endIndex}
*
* @since 1.4
* @spec JSR-51
*/
public CharSequence subSequence(int beginIndex, int endIndex) {
return this.substring(beginIndex, endIndex);
@ -2038,7 +2037,6 @@ public final class String
* @see java.util.regex.Pattern
*
* @since 1.4
* @spec JSR-51
*/
public boolean matches(String regex) {
return Pattern.matches(regex, this);
@ -2095,7 +2093,6 @@ public final class String
* @see java.util.regex.Pattern
*
* @since 1.4
* @spec JSR-51
*/
public String replaceFirst(String regex, String replacement) {
return Pattern.compile(regex).matcher(this).replaceFirst(replacement);
@ -2140,7 +2137,6 @@ public final class String
* @see java.util.regex.Pattern
*
* @since 1.4
* @spec JSR-51
*/
public String replaceAll(String regex, String replacement) {
return Pattern.compile(regex).matcher(this).replaceAll(replacement);
@ -2301,7 +2297,6 @@ public final class String
* @see java.util.regex.Pattern
*
* @since 1.4
* @spec JSR-51
*/
public String[] split(String regex, int limit) {
/* fastpath if the regex is a
@ -2399,7 +2394,6 @@ public final class String
* @see java.util.regex.Pattern
*
* @since 1.4
* @spec JSR-51
*/
public String[] split(String regex) {
return split(regex, 0);

View file

@ -981,7 +981,6 @@ public class Thread implements Runnable {
* if the current thread cannot modify this thread
*
* @revised 6.0, 14
* @spec JSR-51
*/
public void interrupt() {
if (this != Thread.currentThread()) {

View file

@ -153,7 +153,6 @@ public class MethodHandles {
* @return a lookup object which is trusted minimally
*
* @revised 9
* @spec JPMS
*/
public static Lookup publicLookup() {
return Lookup.PUBLIC_LOOKUP;
@ -217,7 +216,6 @@ public class MethodHandles {
* @throws SecurityException if denied by the security manager
* @throws IllegalAccessException if any of the other access checks specified above fails
* @since 9
* @spec JPMS
* @see Lookup#dropLookupMode
* @see <a href="MethodHandles.Lookup.html#cross-module-lookup">Cross-module lookups</a>
*/
@ -1330,7 +1328,6 @@ public class MethodHandles {
* previous lookup class} is always {@code null}.
*
* @since 9
* @spec JPMS
*/
public static final int MODULE = PACKAGE << 1;
@ -1349,7 +1346,6 @@ public class MethodHandles {
* previous lookup class} is always {@code null}.
*
* @since 9
* @spec JPMS
* @see #publicLookup()
*/
public static final int UNCONDITIONAL = PACKAGE << 2;
@ -1438,7 +1434,6 @@ public class MethodHandles {
* @see #dropLookupMode
*
* @revised 9
* @spec JPMS
*/
public int lookupModes() {
return allowedModes & ALL_MODES;
@ -1518,7 +1513,6 @@ public class MethodHandles {
* @throws NullPointerException if the argument is null
*
* @revised 9
* @spec JPMS
* @see #accessClass(Class)
* @see <a href="#cross-module-lookup">Cross-module lookups</a>
*/
@ -1665,7 +1659,6 @@ public class MethodHandles {
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
* @throws NullPointerException if {@code bytes} is {@code null}
* @since 9
* @spec JPMS
* @see Lookup#privateLookupIn
* @see Lookup#dropLookupMode
* @see ClassLoader#defineClass(String,byte[],int,int,ProtectionDomain)
@ -2317,7 +2310,6 @@ public class MethodHandles {
* @see #in
*
* @revised 9
* @spec JPMS
*/
@Override
public String toString() {

View file

@ -99,7 +99,6 @@ import jdk.internal.vm.annotation.Stable;
* }</pre>
*
* @since 9
* @spec JPMS
* @see java.lang.ModuleLayer
*/
public final class Configuration {

View file

@ -33,7 +33,6 @@ package java.lang.module;
* reasons.
*
* @since 9
* @spec JPMS
*/
public class FindException extends RuntimeException {

View file

@ -31,7 +31,6 @@ package java.lang.module;
*
* @see ModuleDescriptor#read
* @since 9
* @spec JPMS
*/
public class InvalidModuleDescriptorException extends RuntimeException {
@java.io.Serial

View file

@ -88,7 +88,6 @@ import jdk.internal.module.ModuleInfo;
*
* @see java.lang.Module
* @since 9
* @spec JPMS
*/
public class ModuleDescriptor
@ -100,7 +99,6 @@ public class ModuleDescriptor
*
* @see ModuleDescriptor#modifiers()
* @since 9
* @spec JPMS
*/
public enum Modifier {
/**
@ -135,7 +133,6 @@ public class ModuleDescriptor
*
* @see ModuleDescriptor#requires()
* @since 9
* @spec JPMS
*/
public final static class Requires
@ -147,7 +144,6 @@ public class ModuleDescriptor
*
* @see Requires#modifiers()
* @since 9
* @spec JPMS
*/
public enum Modifier {
@ -365,7 +361,6 @@ public class ModuleDescriptor
*
* @see ModuleDescriptor#exports()
* @since 9
* @spec JPMS
*/
public final static class Exports
@ -377,7 +372,6 @@ public class ModuleDescriptor
*
* @see Exports#modifiers()
* @since 9
* @spec JPMS
*/
public enum Modifier {
@ -573,7 +567,6 @@ public class ModuleDescriptor
*
* @see ModuleDescriptor#opens()
* @since 9
* @spec JPMS
*/
public final static class Opens
@ -584,7 +577,6 @@ public class ModuleDescriptor
*
* @see Opens#modifiers()
* @since 9
* @spec JPMS
*/
public enum Modifier {
@ -774,7 +766,6 @@ public class ModuleDescriptor
*
* @see ModuleDescriptor#provides()
* @since 9
* @spec JPMS
*/
public final static class Provides
@ -949,7 +940,6 @@ public class ModuleDescriptor
*
* @see ModuleDescriptor#version()
* @since 9
* @spec JPMS
*/
public final static class Version
@ -1506,7 +1496,6 @@ public class ModuleDescriptor
* {@link #build build} method.
*
* @since 9
* @spec JPMS
*/
public static final class Builder {
final String name;

View file

@ -80,7 +80,6 @@ import jdk.internal.module.SystemModuleFinders;
* <p> A {@code ModuleFinder} is not required to be thread safe. </p>
*
* @since 9
* @spec JPMS
*/
public interface ModuleFinder {

View file

@ -76,7 +76,6 @@ import java.util.stream.Stream;
*
* @see ModuleReference
* @since 9
* @spec JPMS
*/
public interface ModuleReader extends Closeable {

View file

@ -44,7 +44,6 @@ import java.util.Optional;
* @see ModuleFinder
* @see ModuleReader
* @since 9
* @spec JPMS
*/
public abstract class ModuleReference {

View file

@ -31,7 +31,6 @@ package java.lang.module;
*
* @see Configuration
* @since 9
* @spec JPMS
*/
public class ResolutionException extends RuntimeException {
@java.io.Serial

View file

@ -37,7 +37,6 @@ import java.util.Set;
* module's content.
*
* @since 9
* @spec JPMS
* @see Configuration#modules()
*/
public final class ResolvedModule {

View file

@ -208,7 +208,6 @@
* was enumerated by previous (or parent) resolution. </p>
*
* @since 9
* @spec JPMS
*/
package java.lang.module;

View file

@ -75,7 +75,6 @@ import sun.security.util.SecurityConstants;
* @jls 6.6 Access Control
* @since 1.2
* @revised 9
* @spec JPMS
*/
public class AccessibleObject implements AnnotatedElement {
static {
@ -120,7 +119,6 @@ public class AccessibleObject implements AnnotatedElement {
* @see SecurityManager#checkPermission
* @see ReflectPermission
* @revised 9
* @spec JPMS
*/
@CallerSensitive
public static void setAccessible(AccessibleObject[] array, boolean flag) {
@ -198,7 +196,6 @@ public class AccessibleObject implements AnnotatedElement {
* @see #trySetAccessible
* @see java.lang.invoke.MethodHandles#privateLookupIn
* @revised 9
* @spec JPMS
*/
@CallerSensitive // overrides in Method/Field/Constructor are @CS
public void setAccessible(boolean flag) {
@ -258,7 +255,6 @@ public class AccessibleObject implements AnnotatedElement {
* @throws SecurityException if the request is denied by the security manager
*
* @since 9
* @spec JPMS
* @see java.lang.invoke.MethodHandles#privateLookupIn
*/
@CallerSensitive
@ -422,7 +418,6 @@ public class AccessibleObject implements AnnotatedElement {
* it should use {@link #canAccess(Object)}.
*
* @revised 9
* @spec JPMS
*/
@Deprecated(since="9")
public boolean isAccessible() {
@ -459,7 +454,6 @@ public class AccessibleObject implements AnnotatedElement {
* </ul>
*
* @since 9
* @spec JPMS
* @jls 6.6 Access Control
* @see #trySetAccessible
* @see #setAccessible(boolean)

View file

@ -172,7 +172,6 @@ public final class Constructor<T> extends Executable {
* @throws SecurityException if the request is denied by the security manager
* or this is a constructor for {@code java.lang.Class}
*
* @spec JPMS
*/
@Override
@CallerSensitive

View file

@ -30,7 +30,6 @@ package java.lang.reflect;
*
* @see AccessibleObject#setAccessible(boolean)
* @since 9
* @spec JPMS
*/
public class InaccessibleObjectException extends RuntimeException {

View file

@ -280,7 +280,6 @@ import static java.lang.module.ModuleDescriptor.Modifier.SYNTHETIC;
* @see InvocationHandler
* @since 1.3
* @revised 9
* @spec JPMS
*/
public class Proxy implements java.io.Serializable {
@java.io.Serial
@ -371,7 +370,6 @@ public class Proxy implements java.io.Serializable {
*
* @see <a href="#membership">Package and Module Membership of Proxy Class</a>
* @revised 9
* @spec JPMS
*/
@Deprecated
@CallerSensitive
@ -993,7 +991,6 @@ public class Proxy implements java.io.Serializable {
*
* @see <a href="#membership">Package and Module Membership of Proxy Class</a>
* @revised 9
* @spec JPMS
*/
@CallerSensitive
public static Object newProxyInstance(ClassLoader loader,
@ -1077,7 +1074,6 @@ public class Proxy implements java.io.Serializable {
* @throws NullPointerException if {@code cl} is {@code null}
*
* @revised 9
* @spec JPMS
*/
public static boolean isProxyClass(Class<?> cl) {
return Proxy.class.isAssignableFrom(cl) && ProxyBuilder.isProxyClass(cl);

View file

@ -45,6 +45,5 @@
*
* @since 1.1
* @revised 9
* @spec JPMS
*/
package java.lang.reflect;