From 6930e80c3122c0b4715aaf24fd6e6a5d5007abdc Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 20 May 2019 17:29:44 -0700 Subject: [PATCH] 8224175: Fix inconsistencies in @jls and @jvms tags Reviewed-by: jjg, rfield --- .../share/classes/java/lang/Byte.java | 12 ++--- .../share/classes/java/lang/Class.java | 5 +- .../share/classes/java/lang/ClassLoader.java | 8 ++-- .../share/classes/java/lang/Double.java | 12 ++--- .../share/classes/java/lang/Float.java | 12 ++--- .../java/lang/FunctionalInterface.java | 4 +- .../share/classes/java/lang/Integer.java | 12 ++--- .../share/classes/java/lang/Long.java | 10 ++-- .../share/classes/java/lang/Number.java | 6 +-- .../share/classes/java/lang/Package.java | 4 +- .../share/classes/java/lang/Short.java | 12 ++--- .../classes/java/lang/SuppressWarnings.java | 4 +- .../classes/java/lang/constant/Constable.java | 4 +- .../classes/java/lang/reflect/Method.java | 6 +-- .../classes/java/lang/reflect/Modifier.java | 4 +- .../javax/lang/model/AnnotatedConstruct.java | 4 +- .../javax/lang/model/element/Element.java | 4 +- .../javax/lang/model/element/NestingKind.java | 4 +- .../classes/javax/lang/model/util/Types.java | 6 +-- .../com/sun/source/tree/BinaryTree.java | 6 +-- .../com/sun/source/tree/ModifiersTree.java | 4 +- .../com/sun/tools/javac/code/Types.java | 6 +-- .../com/sun/tools/javac/comp/Attr.java | 2 +- .../classes/jdk/jshell/ExpressionSnippet.java | 4 +- .../classes/jdk/jshell/ImportSnippet.java | 4 +- .../classes/jdk/jshell/MethodSnippet.java | 4 +- .../share/classes/jdk/jshell/Snippet.java | 46 +++++++++---------- .../classes/jdk/jshell/StatementSnippet.java | 4 +- .../share/classes/jdk/jshell/VarSnippet.java | 4 +- 29 files changed, 108 insertions(+), 109 deletions(-) diff --git a/src/java.base/share/classes/java/lang/Byte.java b/src/java.base/share/classes/java/lang/Byte.java index 31f31b1c052..f7ac523f1a2 100644 --- a/src/java.base/share/classes/java/lang/Byte.java +++ b/src/java.base/share/classes/java/lang/Byte.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -356,7 +356,7 @@ public final class Byte extends Number implements Comparable { /** * Returns the value of this {@code Byte} as a {@code short} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public short shortValue() { return (short)value; @@ -365,7 +365,7 @@ public final class Byte extends Number implements Comparable { /** * Returns the value of this {@code Byte} as an {@code int} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public int intValue() { return (int)value; @@ -374,7 +374,7 @@ public final class Byte extends Number implements Comparable { /** * Returns the value of this {@code Byte} as a {@code long} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public long longValue() { return (long)value; @@ -383,7 +383,7 @@ public final class Byte extends Number implements Comparable { /** * Returns the value of this {@code Byte} as a {@code float} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public float floatValue() { return (float)value; @@ -392,7 +392,7 @@ public final class Byte extends Number implements Comparable { /** * Returns the value of this {@code Byte} as a {@code double} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public double doubleValue() { return (double)value; diff --git a/src/java.base/share/classes/java/lang/Class.java b/src/java.base/share/classes/java/lang/Class.java index 31292ae122c..351df755b73 100644 --- a/src/java.base/share/classes/java/lang/Class.java +++ b/src/java.base/share/classes/java/lang/Class.java @@ -999,7 +999,7 @@ public final class Class implements java.io.Serializable, * * @since 9 * @spec JPMS - * @jls 6.7 Fully Qualified Names + * @jls 6.7 Fully Qualified Names */ public String getPackageName() { String pn = this.packageName; @@ -3910,7 +3910,8 @@ public final class Class implements java.io.Serializable, * SecurityManager#checkPackageAccess s.checkPackageAccess()} * denies access to the package of the returned class * @since 11 - * @jvms 4.7.28 and 4.7.29 NestHost and NestMembers attributes + * @jvms 4.7.28 The {@code NestHost} Attribute + * @jvms 4.7.29 The {@code NestMembers} Attribute * @jvms 5.4.4 Access Control */ @CallerSensitive diff --git a/src/java.base/share/classes/java/lang/ClassLoader.java b/src/java.base/share/classes/java/lang/ClassLoader.java index c250981cf1b..7ac0e39da11 100644 --- a/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/src/java.base/share/classes/java/lang/ClassLoader.java @@ -222,7 +222,7 @@ import sun.security.util.SecurityConstants; * or a fully qualified name as defined by * The Java™ Language Specification. * - * @jls 6.7 Fully Qualified Names + * @jls 6.7 Fully Qualified Names * @jls 13.1 The Form of a Binary * @see #resolveClass(Class) * @since 1.0 @@ -2194,7 +2194,7 @@ public abstract class ClassLoader { * @revised 9 * @spec JPMS * - * @jvms 5.3 Run-time package + * @jvms 5.3 Creation and Loading * @see * The JAR File Specification: Package Sealing */ @@ -2228,7 +2228,7 @@ public abstract class ClassLoader { * @throws NullPointerException * if {@code name} is {@code null}. * - * @jvms 5.3 Run-time package + * @jvms 5.3 Creation and Loading * * @since 9 * @spec JPMS @@ -2255,7 +2255,7 @@ public abstract class ClassLoader { * this class loader; or an zero length array if no package has been * defined by this class loader. * - * @jvms 5.3 Run-time package + * @jvms 5.3 Creation and Loading * * @since 9 * @spec JPMS diff --git a/src/java.base/share/classes/java/lang/Double.java b/src/java.base/share/classes/java/lang/Double.java index f18f8ce1959..9c3355528c3 100644 --- a/src/java.base/share/classes/java/lang/Double.java +++ b/src/java.base/share/classes/java/lang/Double.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, 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 @@ -673,7 +673,7 @@ public final class Double extends Number * * @return the {@code double} value represented by this object * converted to type {@code byte} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion * @since 1.1 */ public byte byteValue() { @@ -686,7 +686,7 @@ public final class Double extends Number * * @return the {@code double} value represented by this object * converted to type {@code short} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion * @since 1.1 */ public short shortValue() { @@ -696,7 +696,7 @@ public final class Double extends Number /** * Returns the value of this {@code Double} as an {@code int} * after a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion * * @return the {@code double} value represented by this object * converted to type {@code int} @@ -711,7 +711,7 @@ public final class Double extends Number * * @return the {@code double} value represented by this object * converted to type {@code long} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public long longValue() { return (long)value; @@ -723,7 +723,7 @@ public final class Double extends Number * * @return the {@code double} value represented by this object * converted to type {@code float} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion * @since 1.0 */ public float floatValue() { diff --git a/src/java.base/share/classes/java/lang/Float.java b/src/java.base/share/classes/java/lang/Float.java index 96953bb8c83..ae18af2902f 100644 --- a/src/java.base/share/classes/java/lang/Float.java +++ b/src/java.base/share/classes/java/lang/Float.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, 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 @@ -602,7 +602,7 @@ public final class Float extends Number * * @return the {@code float} value represented by this object * converted to type {@code byte} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public byte byteValue() { return (byte)value; @@ -614,7 +614,7 @@ public final class Float extends Number * * @return the {@code float} value represented by this object * converted to type {@code short} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion * @since 1.1 */ public short shortValue() { @@ -627,7 +627,7 @@ public final class Float extends Number * * @return the {@code float} value represented by this object * converted to type {@code int} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public int intValue() { return (int)value; @@ -639,7 +639,7 @@ public final class Float extends Number * * @return the {@code float} value represented by this object * converted to type {@code long} - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public long longValue() { return (long)value; @@ -661,7 +661,7 @@ public final class Float extends Number * * @return the {@code float} value represented by this * object converted to type {@code double} - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public double doubleValue() { return (double)value; diff --git a/src/java.base/share/classes/java/lang/FunctionalInterface.java b/src/java.base/share/classes/java/lang/FunctionalInterface.java index 72ecca6965a..5b97003dc45 100644 --- a/src/java.base/share/classes/java/lang/FunctionalInterface.java +++ b/src/java.base/share/classes/java/lang/FunctionalInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -57,7 +57,7 @@ import java.lang.annotation.*; * regardless of whether or not a {@code FunctionalInterface} * annotation is present on the interface declaration. * - * @jls 4.3.2. The Class Object + * @jls 4.3.2 The Class Object * @jls 9.8 Functional Interfaces * @jls 9.4.3 Interface Method Body * @jls 9.6.4.9 @FunctionalInterface diff --git a/src/java.base/share/classes/java/lang/Integer.java b/src/java.base/share/classes/java/lang/Integer.java index 6aebaadd0d0..50639ef9920 100644 --- a/src/java.base/share/classes/java/lang/Integer.java +++ b/src/java.base/share/classes/java/lang/Integer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2018, 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 @@ -1120,7 +1120,7 @@ public final class Integer extends Number /** * Returns the value of this {@code Integer} as a {@code byte} * after a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public byte byteValue() { return (byte)value; @@ -1129,7 +1129,7 @@ public final class Integer extends Number /** * Returns the value of this {@code Integer} as a {@code short} * after a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public short shortValue() { return (short)value; @@ -1147,7 +1147,7 @@ public final class Integer extends Number /** * Returns the value of this {@code Integer} as a {@code long} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion * @see Integer#toUnsignedLong(int) */ public long longValue() { @@ -1157,7 +1157,7 @@ public final class Integer extends Number /** * Returns the value of this {@code Integer} as a {@code float} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public float floatValue() { return (float)value; @@ -1166,7 +1166,7 @@ public final class Integer extends Number /** * Returns the value of this {@code Integer} as a {@code double} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public double doubleValue() { return (double)value; diff --git a/src/java.base/share/classes/java/lang/Long.java b/src/java.base/share/classes/java/lang/Long.java index f75ade48abe..56fc24e65d3 100644 --- a/src/java.base/share/classes/java/lang/Long.java +++ b/src/java.base/share/classes/java/lang/Long.java @@ -1339,7 +1339,7 @@ public final class Long extends Number /** * Returns the value of this {@code Long} as a {@code byte} after * a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public byte byteValue() { return (byte)value; @@ -1348,7 +1348,7 @@ public final class Long extends Number /** * Returns the value of this {@code Long} as a {@code short} after * a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public short shortValue() { return (short)value; @@ -1357,7 +1357,7 @@ public final class Long extends Number /** * Returns the value of this {@code Long} as an {@code int} after * a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public int intValue() { return (int)value; @@ -1375,7 +1375,7 @@ public final class Long extends Number /** * Returns the value of this {@code Long} as a {@code float} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public float floatValue() { return (float)value; @@ -1384,7 +1384,7 @@ public final class Long extends Number /** * Returns the value of this {@code Long} as a {@code double} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public double doubleValue() { return (double)value; diff --git a/src/java.base/share/classes/java/lang/Number.java b/src/java.base/share/classes/java/lang/Number.java index 76657378d13..1359a99be10 100644 --- a/src/java.base/share/classes/java/lang/Number.java +++ b/src/java.base/share/classes/java/lang/Number.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2015, 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 @@ -48,8 +48,8 @@ package java.lang; * * @author Lee Boynton * @author Arthur van Hoff - * @jls 5.1.2 Widening Primitive Conversions - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion + * @jls 5.1.3 Narrowing Primitive Conversion * @since 1.0 */ public abstract class Number implements java.io.Serializable { diff --git a/src/java.base/share/classes/java/lang/Package.java b/src/java.base/share/classes/java/lang/Package.java index cb17d7a1ca8..f55966f5b6f 100644 --- a/src/java.base/share/classes/java/lang/Package.java +++ b/src/java.base/share/classes/java/lang/Package.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -108,7 +108,7 @@ import jdk.internal.reflect.Reflection; * named modules. Instead those packages are automatically defined * and have no specification and implementation versioning information. * - * @jvms 5.3 Run-time package + * @jvms 5.3 Creation and Loading * @see * The JAR File Specification: Package Sealing * @see ClassLoader#definePackage(String, String, String, String, String, String, String, URL) diff --git a/src/java.base/share/classes/java/lang/Short.java b/src/java.base/share/classes/java/lang/Short.java index 5ddcae96ddb..70a74b96b6a 100644 --- a/src/java.base/share/classes/java/lang/Short.java +++ b/src/java.base/share/classes/java/lang/Short.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -352,7 +352,7 @@ public final class Short extends Number implements Comparable { /** * Returns the value of this {@code Short} as a {@code byte} after * a narrowing primitive conversion. - * @jls 5.1.3 Narrowing Primitive Conversions + * @jls 5.1.3 Narrowing Primitive Conversion */ public byte byteValue() { return (byte)value; @@ -370,7 +370,7 @@ public final class Short extends Number implements Comparable { /** * Returns the value of this {@code Short} as an {@code int} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public int intValue() { return (int)value; @@ -379,7 +379,7 @@ public final class Short extends Number implements Comparable { /** * Returns the value of this {@code Short} as a {@code long} after * a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public long longValue() { return (long)value; @@ -388,7 +388,7 @@ public final class Short extends Number implements Comparable { /** * Returns the value of this {@code Short} as a {@code float} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public float floatValue() { return (float)value; @@ -397,7 +397,7 @@ public final class Short extends Number implements Comparable { /** * Returns the value of this {@code Short} as a {@code double} * after a widening primitive conversion. - * @jls 5.1.2 Widening Primitive Conversions + * @jls 5.1.2 Widening Primitive Conversion */ public double doubleValue() { return (double)value; diff --git a/src/java.base/share/classes/java/lang/SuppressWarnings.java b/src/java.base/share/classes/java/lang/SuppressWarnings.java index 1f4e0e0d95e..09ab6c4724b 100644 --- a/src/java.base/share/classes/java/lang/SuppressWarnings.java +++ b/src/java.base/share/classes/java/lang/SuppressWarnings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -49,7 +49,7 @@ import static java.lang.annotation.ElementType.*; * @jls 4.8 Raw Types * @jls 4.12.2 Variables of Reference Type * @jls 5.1.9 Unchecked Conversion - * @jls 5.5.2 Checked Casts and Unchecked Casts + * @jls 5.5 Casting Contexts * @jls 9.6.4.5 @SuppressWarnings */ @Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, MODULE}) diff --git a/src/java.base/share/classes/java/lang/constant/Constable.java b/src/java.base/share/classes/java/lang/constant/Constable.java index 64525be9daf..33875654c05 100644 --- a/src/java.base/share/classes/java/lang/constant/Constable.java +++ b/src/java.base/share/classes/java/lang/constant/Constable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 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 @@ -59,7 +59,7 @@ import java.util.Optional; * method handles, but not necessarily those produced by method handle * combinators.) * @jvms 4.4 The Constant Pool - * @jvms 4.4.10 The CONSTANT_InvokeDynamic_info Structure + * @jvms 4.4.10 The {@code CONSTANT_Dynamic_info} and {@code CONSTANT_InvokeDynamic_info} Structures * * @since 12 */ diff --git a/src/java.base/share/classes/java/lang/reflect/Method.java b/src/java.base/share/classes/java/lang/reflect/Method.java index dffeb575654..201a1ae3bc0 100644 --- a/src/java.base/share/classes/java/lang/reflect/Method.java +++ b/src/java.base/share/classes/java/lang/reflect/Method.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -403,7 +403,7 @@ public final class Method extends Executable { * @return a string describing this {@code Method} * * @jls 8.4.3 Method Modifiers - * @jls 9.4 Method Declarations + * @jls 9.4 Method Declarations * @jls 9.6.1 Annotation Type Elements */ public String toString() { @@ -474,7 +474,7 @@ public final class Method extends Executable { * @since 1.5 * * @jls 8.4.3 Method Modifiers - * @jls 9.4 Method Declarations + * @jls 9.4 Method Declarations * @jls 9.6.1 Annotation Type Elements */ @Override diff --git a/src/java.base/share/classes/java/lang/reflect/Modifier.java b/src/java.base/share/classes/java/lang/reflect/Modifier.java index 8520aabb8db..ca6aeccafad 100644 --- a/src/java.base/share/classes/java/lang/reflect/Modifier.java +++ b/src/java.base/share/classes/java/lang/reflect/Modifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -394,7 +394,7 @@ public class Modifier { /** * The Java source modifiers that can be applied to a field. - * @jls 8.3.1 Field Modifiers + * @jls 8.3.1 Field Modifiers */ private static final int FIELD_MODIFIERS = Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | diff --git a/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java b/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java index a32e65eb2b4..e2e12be18e8 100644 --- a/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java +++ b/src/java.compiler/share/classes/javax/lang/model/AnnotatedConstruct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -114,7 +114,7 @@ import javax.lang.model.type.*; * * @since 1.8 * @jls 9.6 Annotation Types - * @jls 9.6.3.3 @Inherited + * @jls 9.6.4.3 {@code @Inherited} */ public interface AnnotatedConstruct { /** diff --git a/src/java.compiler/share/classes/javax/lang/model/element/Element.java b/src/java.compiler/share/classes/javax/lang/model/element/Element.java index 7d93d1523d6..055a8d802aa 100644 --- a/src/java.compiler/share/classes/javax/lang/model/element/Element.java +++ b/src/java.compiler/share/classes/javax/lang/model/element/Element.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -196,7 +196,7 @@ public interface Element extends javax.lang.model.AnnotatedConstruct { * @see ModuleElement#getEnclosedElements * @see Elements#getAllMembers * @jls 8.8.9 Default Constructor - * @jls 8.9 Enums + * @jls 8.9 Enum Types * @revised 9 * @spec JPMS */ diff --git a/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java b/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java index 1502255ff67..6f44be536a2 100644 --- a/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java +++ b/src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -111,7 +111,7 @@ public enum NestingKind { * More specifically, an inner type element is any nested type element that * is not {@linkplain Modifier#STATIC static}. * @return whether or not the constant is nested - * @jls 14.3 Inner Classes and Enclosing Instances + * @jls 14.3 Local Class Declarations */ public boolean isNested() { return this != TOP_LEVEL; diff --git a/src/java.compiler/share/classes/javax/lang/model/util/Types.java b/src/java.compiler/share/classes/javax/lang/model/util/Types.java index 1c736c727ba..9f41a57b0ba 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/Types.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/Types.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -104,7 +104,7 @@ public interface Types { * @return {@code true} if and only if the first type is assignable * to the second * @throws IllegalArgumentException if given a type for an executable, package, or module - * @jls 5.2 Assignment Conversion + * @jls 5.2 Assignment Contexts */ boolean isAssignable(TypeMirror t1, TypeMirror t2); @@ -115,7 +115,7 @@ public interface Types { * @param t2 the second type * @return {@code true} if and only if the first type contains the second * @throws IllegalArgumentException if given a type for an executable, package, or module - * @jls 4.5.1.1 Type Argument Containment and Equivalence + * @jls 4.5.1 Type Arguments of Parameterized Types */ boolean contains(TypeMirror t1, TypeMirror t2); diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/BinaryTree.java b/src/jdk.compiler/share/classes/com/sun/source/tree/BinaryTree.java index 74f85a82923..1590a55d9c5 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/tree/BinaryTree.java +++ b/src/jdk.compiler/share/classes/com/sun/source/tree/BinaryTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -40,8 +40,8 @@ package com.sun.source.tree; * @jls 15.20 Relational Operators * @jls 15.21 Equality Operators * @jls 15.22 Bitwise and Logical Operators - * @jls 15.23 Conditional-And Operator && - * @jls 15.24 Conditional-Or Operator || + * @jls 15.23 Conditional-And Operator {@code &&} + * @jls 15.24 Conditional-Or Operator {@code ||} * * @author Peter von der Ahé * @author Jonathan Gibbons diff --git a/src/jdk.compiler/share/classes/com/sun/source/tree/ModifiersTree.java b/src/jdk.compiler/share/classes/com/sun/source/tree/ModifiersTree.java index 3abafe3ef2a..a193d4516e3 100644 --- a/src/jdk.compiler/share/classes/com/sun/source/tree/ModifiersTree.java +++ b/src/jdk.compiler/share/classes/com/sun/source/tree/ModifiersTree.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -45,7 +45,7 @@ import javax.lang.model.element.Modifier; * @jls 8.5.1 Static Member Type Declarations * @jls 8.8.3 Constructor Modifiers * @jls 9.1.1 Interface Modifiers - * @jls 9.7 Annotations + * @jls 9.7 Annotations * * @author Peter von der Ahé * @author Jonathan Gibbons diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java index 868e1dbf4e6..54012a607f9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java @@ -2733,7 +2733,7 @@ public class Types { * signature of the other. This is not an equivalence * relation. * - * @jls section 8.4.2. + * @jls 8.4.2 Method Signature * @see #overrideEquivalent(Type t, Type s) * @param t first signature (possibly raw). * @param s second signature (could be subjected to erasure). @@ -2752,7 +2752,7 @@ public class Types { * equivalence. This is the natural extension of * isSubSignature to an equivalence relation. * - * @jls section 8.4.2. + * @jls 8.4.2 Method Signature * @see #isSubSignature(Type t, Type s) * @param t a signature (possible raw, could be subjected to * erasure). @@ -4214,7 +4214,7 @@ public class Types { /** * Return-Type-Substitutable. - * @jls section 8.4.5 + * @jls 8.4.5 Method Result */ public boolean returnTypeSubstitutable(Type r1, Type r2) { if (hasSameArgs(r1, r2)) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index 2c4c5894a94..7b622c97245 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -4222,7 +4222,7 @@ public class Attr extends JCTree.Visitor { * @param tree The tree making up the variable reference. * @param env The current environment. * @param v The variable's symbol. - * @jls section 8.9 Enums + * @jls 8.9 Enum Types */ private void checkEnumInitializer(JCTree tree, Env env, VarSymbol v) { // JLS: diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java index 547cb4cca1b..887e8dc9a34 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ExpressionSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,7 +36,7 @@ import jdk.jshell.Key.ExpressionKey; * and thus is thread-safe. * * @since 9 - * @jls 15: Expression. + * @jls 15 Expressions */ public class ExpressionSnippet extends Snippet { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java index 58c5a7ee253..ea30984b640 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/ImportSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,7 +36,7 @@ import jdk.jshell.Key.ImportKey; * and thus is thread-safe. * * @since 9 - * @jls 8.3: importDeclaration. + * @jls 7.5 Import Declarations */ public class ImportSnippet extends PersistentSnippet { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java index 2d48f882da2..28ebe51baa1 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/MethodSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -37,7 +37,7 @@ import jdk.jshell.Key.MethodKey; * and thus is thread-safe. * * @since 9 - * @jls 8.4: MethodDeclaration. + * @jls 8.4 Method Declarations */ public class MethodSnippet extends DeclarationSnippet { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java index 55fd5bfe42b..f690be6c25c 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/Snippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -73,7 +73,7 @@ public abstract class Snippet { * ({@link jdk.jshell.Snippet.SubKind#SINGLE_STATIC_IMPORT_SUBKIND}) -- * use {@link jdk.jshell.Snippet#subKind()} to distinguish. * - * @jls 8.3: importDeclaration. + * @jls 7.5 Import Declarations *

* An import declaration is {@linkplain Kind#isPersistent() persistent}. */ @@ -91,7 +91,7 @@ public abstract class Snippet { * annotation interfaces -- see {@link jdk.jshell.Snippet.SubKind} to * differentiate. * - * @jls 7.6: TypeDeclaration. + * @jls 7.6 Top Level Type Declarations *

* A type declaration is {@linkplain Kind#isPersistent() persistent}. */ @@ -101,7 +101,7 @@ public abstract class Snippet { * A method declaration. * The snippet is an instance of {@link jdk.jshell.MethodSnippet}. * - * @jls 8.4: MethodDeclaration. + * @jls 8.4 Method Declarations *

* A method declaration is {@linkplain Kind#isPersistent() persistent}. */ @@ -116,7 +116,7 @@ public abstract class Snippet { * variable representing an expression -- see * {@link jdk.jshell.Snippet.SubKind}to differentiate. * - * @jls 8.3: FieldDeclaration. + * @jls 8.3 Field Declarations *

* A variable declaration is {@linkplain Kind#isPersistent() persistent}. */ @@ -133,7 +133,7 @@ public abstract class Snippet { * All other expression forms (operators, method calls, ...) generate a * scratch variable and so are instead of the VAR Kind. * - * @jls 15: Expression. + * @jls 15 Expressions */ EXPRESSION(false), @@ -141,7 +141,7 @@ public abstract class Snippet { * A statement. * The snippet is an instance of {@link jdk.jshell.StatementSnippet}. * - * @jls 14.5: Statement. + * @jls 14.5 Statements */ STATEMENT(false), @@ -185,99 +185,97 @@ public abstract class Snippet { /** * Single-Type-Import Declaration. * An import declaration of a single type. - * @jls 7.5.1 SingleTypeImportDeclaration. + * @jls 7.5.1 Single-Type-Import Declarations */ SINGLE_TYPE_IMPORT_SUBKIND(Kind.IMPORT), /** * Type-Import-on-Demand Declaration. * A non-static "star" import. - * @jls 7.5.2. TypeImportOnDemandDeclaration. + * @jls 7.5.2 Type-Import-on-Demand Declarations */ TYPE_IMPORT_ON_DEMAND_SUBKIND(Kind.IMPORT), /** * Single-Static-Import Declaration. * An import of a static member. - * @jls 7.5.3 Single-Static-Import. + * @jls 7.5.3 Single-Static-Import Declarations */ SINGLE_STATIC_IMPORT_SUBKIND(Kind.IMPORT), /** * Static-Import-on-Demand Declaration. * A static "star" import of all static members of a named type. - * @jls 7.5.4. Static-Import-on-Demand Static "star" import. + * @jls 7.5.4 Static-Import-on-Demand Declarations */ STATIC_IMPORT_ON_DEMAND_SUBKIND(Kind.IMPORT), /** * A class declaration. * A {@code SubKind} of {@link Kind#TYPE_DECL}. - * @jls 8.1. NormalClassDeclaration. + * @jls 8.1 Class Declarations */ CLASS_SUBKIND(Kind.TYPE_DECL), /** * An interface declaration. * A {@code SubKind} of {@link Kind#TYPE_DECL}. - * @jls 9.1. NormalInterfaceDeclaration. + * @jls 9.1 Interface Declarations */ INTERFACE_SUBKIND(Kind.TYPE_DECL), /** * An enum declaration. * A {@code SubKind} of {@link Kind#TYPE_DECL}. - * @jls 8.9. EnumDeclaration. + * @jls 8.9 Enum Types */ ENUM_SUBKIND(Kind.TYPE_DECL), /** * An annotation interface declaration. A {@code SubKind} of * {@link Kind#TYPE_DECL}. - * @jls 9.6. AnnotationTypeDeclaration. + * @jls 9.6 Annotation Types */ ANNOTATION_TYPE_SUBKIND(Kind.TYPE_DECL), /** * A method. The only {@code SubKind} for {@link Kind#METHOD}. - * @jls 8.4. MethodDeclaration. + * @jls 8.4 Method Declarations */ METHOD_SUBKIND(Kind.METHOD), /** * A variable declaration without initializer. * A {@code SubKind} of {@link Kind#VAR}. - * @jls 8.3. VariableDeclarator without VariableInitializer in - * FieldDeclaration. + * @jls 8.3 Field Declarations */ VAR_DECLARATION_SUBKIND(Kind.VAR, true, true), /** * A variable declaration with an initializer expression. A * {@code SubKind} of {@link Kind#VAR}. - * @jls 8.3. VariableDeclarator with VariableInitializer in - * FieldDeclaration. + * @jls 8.3 Field Declarations */ VAR_DECLARATION_WITH_INITIALIZER_SUBKIND(Kind.VAR, true, true), /** * An expression whose value has been stored in a temporary variable. A * {@code SubKind} of {@link Kind#VAR}. - * @jls 15. Primary. + * @jls 15 Expressions */ TEMP_VAR_EXPRESSION_SUBKIND(Kind.VAR, true, true), /** * A simple variable reference expression. A {@code SubKind} of * {@link Kind#EXPRESSION}. - * @jls 15.11. Field Access as 3.8. Identifier. + * @jls 15.11 Field Access Expressions */ VAR_VALUE_SUBKIND(Kind.EXPRESSION, true, true), /** * An assignment expression. A {@code SubKind} of * {@link Kind#EXPRESSION}. - * @jls 15.26. Assignment. + * @jls 15.26 Assignment Operators */ ASSIGNMENT_SUBKIND(Kind.EXPRESSION, true, true), @@ -289,7 +287,7 @@ public abstract class Snippet { /** * A statement. The only {@code SubKind} for {@link Kind#STATEMENT}. - * @jls 14.5. Statement. + * @jls 14.5 Statements */ STATEMENT_SUBKIND(Kind.STATEMENT, true, false), diff --git a/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java index 423bfd71259..a251eb53991 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/StatementSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,7 +36,7 @@ import jdk.jshell.Key.StatementKey; * and thus is thread-safe. * * @since 9 - * @jls 14.5: Statement. + * @jls 14.5 Statements */ public class StatementSnippet extends Snippet { diff --git a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java index fb29ec92c16..bfd8f0f73c5 100644 --- a/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java +++ b/src/jdk.jshell/share/classes/jdk/jshell/VarSnippet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -39,7 +39,7 @@ import jdk.jshell.Key.VarKey; * and thus is thread-safe. * * @since 9 - * @jls 8.3: FieldDeclaration. + * @jls 8.3 Field Declarations */ public class VarSnippet extends DeclarationSnippet {