+1

Mike

On Dec 20 2013, at 10:29 , Joe Darcy <joe.da...@oracle.com> wrote:

> Hello,
> 
> Please review the patch below to fix
> 
>    JDK-8030785: Missing "since 1.8" javadoc for 
> java.lang.reflect.Method:getParameterCount
> 
> The Executable type was added in 8 so none of the method in Executable should 
> have an @since 1.8 tag.
> 
> In the Constructor and Executable subtypes, @since 1.8 is added to the 
> getParameterCount method. I didn't seen any other similar situations that 
> needed to be corrected.
> 
> Thanks,
> 
> -Joe
> 
> diff -r 33c3c4c0ebcf src/share/classes/java/lang/reflect/Constructor.java
> --- a/src/share/classes/java/lang/reflect/Constructor.java    Fri Dec 20 
> 08:59:52 2013 -0800
> +++ b/src/share/classes/java/lang/reflect/Constructor.java    Fri Dec 20 
> 10:26:15 2013 -0800
> @@ -204,6 +204,7 @@
> 
>     /**
>      * {@inheritDoc}
> +     * @since 1.8
>      */
>     public int getParameterCount() { return parameterTypes.length; }
> 
> diff -r 33c3c4c0ebcf src/share/classes/java/lang/reflect/Executable.java
> --- a/src/share/classes/java/lang/reflect/Executable.java    Fri Dec 20 
> 08:59:52 2013 -0800
> +++ b/src/share/classes/java/lang/reflect/Executable.java    Fri Dec 20 
> 10:26:15 2013 -0800
> @@ -240,7 +240,6 @@
>      * declared or implicitly declared or neither) for the executable
>      * represented by this object.
>      *
> -     * @since 1.8
>      * @return The number of formal parameters for the executable this
>      * object represents
> darcy@ubuntu:~/Sun/OpenJDK/9/dev/jdk$ hg diff | more
> diff -r 33c3c4c0ebcf src/share/classes/java/lang/reflect/Constructor.java
> --- a/src/share/classes/java/lang/reflect/Constructor.java    Fri Dec 20 
> 08:59:52 2013 -0800
> +++ b/src/share/classes/java/lang/reflect/Constructor.java    Fri Dec 20 
> 10:26:17 2013 -0800
> @@ -204,6 +204,7 @@
> 
>     /**
>      * {@inheritDoc}
> +     * @since 1.8
>      */
>     public int getParameterCount() { return parameterTypes.length; }
> 
> diff -r 33c3c4c0ebcf src/share/classes/java/lang/reflect/Executable.java
> --- a/src/share/classes/java/lang/reflect/Executable.java    Fri Dec 20 
> 08:59:52 2013 -0800
> +++ b/src/share/classes/java/lang/reflect/Executable.java    Fri Dec 20 
> 10:26:17 2013 -0800
> @@ -240,7 +240,6 @@
>      * declared or implicitly declared or neither) for the executable
>      * represented by this object.
>      *
> -     * @since 1.8
>      * @return The number of formal parameters for the executable this
>      * object represents
>      */
> @@ -291,7 +290,6 @@
>      * have unique names, or names that are legal identifiers in the
>      * Java programming language (JLS 3.8).
>      *
> -     * @since 1.8
>      * @throws MalformedParametersException if the class file contains
>      * a MethodParameters attribute that is improperly formatted.
>      * @return an array of {@code Parameter} objects representing all
> @@ -523,7 +521,6 @@
>     /**
>      * {@inheritDoc}
>      * @throws NullPointerException {@inheritDoc}
> -     * @since 1.8
>      */
>     @Override
>     public <T extends Annotation> T[] getAnnotationsByType(Class<T> 
> annotationClass) {
> @@ -566,8 +563,6 @@
>      *
>      * @return an object representing the return type of the method
>      * or constructor represented by this {@code Executable}
> -     *
> -     * @since 1.8
>      */
>     public abstract AnnotatedType getAnnotatedReturnType();
> 
> @@ -576,8 +571,6 @@
>      * Returns an AnnotatedType object that represents the use of a type to
>      * specify the return type of the method/constructor represented by this
>      * Executable.
> -     *
> -     * @since 1.8
>      */
>     AnnotatedType getAnnotatedReturnType0(Type returnType) {
>         return 
> TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
> @@ -607,8 +600,6 @@
>      *
>      * @return an object representing the receiver type of the method or
>      * constructor represented by this {@code Executable}
> -     *
> -     * @since 1.8
>      */
>     public AnnotatedType getAnnotatedReceiverType() {
>         if (Modifier.isStatic(this.getModifiers()))
> @@ -635,8 +626,6 @@
>      * @return an array of objects representing the types of the
>      * formal parameters of the method or constructor represented by this
>      * {@code Executable}
> -     *
> -     * @since 1.8
>      */
>     public AnnotatedType[] getAnnotatedParameterTypes() {
>         return 
> TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
> @@ -661,8 +650,6 @@
>      * @return an array of objects representing the declared
>      * exceptions of the method or constructor represented by this {@code
>      * Executable}
> -     *
> -     * @since 1.8
>      */
>     public AnnotatedType[] getAnnotatedExceptionTypes() {
>         return 
> TypeAnnotationParser.buildAnnotatedTypes(getTypeAnnotationBytes0(),
> diff -r 33c3c4c0ebcf src/share/classes/java/lang/reflect/Method.java
> --- a/src/share/classes/java/lang/reflect/Method.java    Fri Dec 20 08:59:52 
> 2013 -0800
> +++ b/src/share/classes/java/lang/reflect/Method.java    Fri Dec 20 10:26:17 
> 2013 -0800
> @@ -251,7 +251,8 @@
>     }
> 
>     /**
> -     * {@inheritDoc}
> +     * {@inheritDoc}1
> +     * @since 1.8
>      */
>     public int getParameterCount() { return parameterTypes.length; }
> 
> 

Reply via email to