changeset 53471:87194c13df63 intrinsics-project

Automatic merge with jep-334
author mcimadamore
date Wed, 21 Nov 2018 18:25:36 +0100
parents 2c83f64aa372 7ee0a867eeb7
children d84717b879ca
files
diffstat 5 files changed, 18 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Class.java	Wed Nov 14 05:02:24 2018 +0100
+++ b/src/java.base/share/classes/java/lang/Class.java	Wed Nov 21 18:25:36 2018 +0100
@@ -4060,10 +4060,11 @@
 
     /**
      * Returns the component type of this {@code Class}, if it describes
-     * an array type, or {@code null} otherwise.
+     * an array type, or {@code null} otherwise.  Equivalent to
+     * {@link Class#getComponentType()}.
      *
      * @return a {@code Class} describing the component type, or {@code null}
-     * if this descriptor does not describe an array type
+     * if this {@code Class} does not describe an array type
      * @since 12
      */
     @Override
@@ -4073,9 +4074,9 @@
 
     /**
      * Create a {@code Class} for an array type whose component type
-     * is described by this {@linkplain ClassDesc}.
-     *
-     * @return a {@code ClassDesc} describing the array type
+     * is described by this {@linkplain Class}.
+     *
+     * @return a {@code Class} describing the array type
      * @since 12
      */
     @Override
--- a/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java	Wed Nov 14 05:02:24 2018 +0100
+++ b/src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java	Wed Nov 21 18:25:36 2018 +0100
@@ -122,7 +122,7 @@
      * callers.
      *
      * @param <T> the type of the dynamic constant
-     * @param bootstrapMethod a {@link DirectMethodHandleDescImpl} describing the
+     * @param bootstrapMethod a {@link DirectMethodHandleDesc} describing the
      *                        bootstrap method for the constant
      * @param constantName The name that would appear in the {@code NameAndType}
      *                     operand of the {@code LDC} for this constant, as per
@@ -216,7 +216,7 @@
     }
 
     /**
-     * Returns The name that would appear in the {@code NameAndType} operand
+     * Returns the name that would appear in the {@code NameAndType} operand
      *             of the {@code LDC} for this constant
      *
      * @return the constant name
@@ -247,6 +247,7 @@
 
     /**
      * Returns the bootstrap arguments for this constant
+     *
      * @return the bootstrap arguments
      */
     public ConstantDesc[] bootstrapArgs() {
@@ -254,9 +255,9 @@
     }
 
     /**
-     * Returns the bootstrap arguments for this constant as a {@link List}
+     * Returns the bootstrap arguments for this constant as an immutable {@link List}
      *
-     * @return a {@link List} of the bootstrap arguments, described as {@link ConstantDesc}
+     * @return a {@link List} of the bootstrap arguments
      */
     public List<ConstantDesc> bootstrapArgsList() {
         return List.of(bootstrapArgs);
--- a/src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java	Wed Nov 14 05:02:24 2018 +0100
+++ b/src/java.base/share/classes/java/lang/constant/MethodHandleDesc.java	Wed Nov 21 18:25:36 2018 +0100
@@ -156,6 +156,8 @@
      * @param fieldType a {@link ClassDesc} describing the type of the field
      * @return the {@linkplain MethodHandleDesc}
      * @throws NullPointerException if any of the arguments are null
+     * @throws IllegalArgumentException if the {@code kind} is not one of the
+     * valid values
      * @jvms 4.2.2 Unqualified Names
      */
     static DirectMethodHandleDesc ofField(DirectMethodHandleDesc.Kind kind,
--- a/src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java	Wed Nov 14 05:02:24 2018 +0100
+++ b/src/java.base/share/classes/java/lang/constant/MethodTypeDesc.java	Wed Nov 21 18:25:36 2018 +0100
@@ -101,7 +101,7 @@
     ClassDesc parameterType(int index);
 
     /**
-     * Get the parameter types as a {@link List}.
+     * Get the parameter types as an immutable {@link List}.
      *
      * @return a {@link List} of {@link ClassDesc} describing the parameter types
      */
--- a/src/java.base/share/classes/java/lang/invoke/TypeDescriptor.java	Wed Nov 14 05:02:24 2018 +0100
+++ b/src/java.base/share/classes/java/lang/invoke/TypeDescriptor.java	Wed Nov 21 18:25:36 2018 +0100
@@ -120,7 +120,7 @@
         F[] parameterArray();
 
         /**
-         * Return a list of field descriptors for the parameter types of the method type
+         * Return an immutable list of field descriptors for the parameter types of the method type
          * described by this descriptor
          * @return field descriptors for the parameter types
          */
@@ -156,9 +156,10 @@
          * @param start the index of the first parameter to remove
          * @param end the index after the last parameter to remove
          * @return the new method descriptor
+         *
          * @throws IndexOutOfBoundsException if {@code start} is outside the half-open
-         * range {[0, parameterCount)}, or {@code end} is outside the closed range
-         * {@code [0, parameterCount]}
+         * range {@code [0, parameterCount)}, or {@code end} is outside the closed range
+         * {@code [0, parameterCount]}, or if {@code start > end}
          */
         M dropParameterTypes(int start, int end);