Re: Cleanup of some doclint warnings in java.lang

2013-06-17 Thread Alan Bateman

On 17/06/2013 04:48, Joe Darcy wrote:

Hello,

Please review the patch below which resolves a subset of the doclint 
warnings in java.lang.


Thanks,

-Joe
One comment on Double is that you've removed the code to fix the 
nesting issue. Did you consider replacing this with pre{@code ... 
}/pre so that you've got {@code ..} around the code fragment. That 
would avoid needing to check it for escaping.


Otherwise looks fine to me.

-Alan.


Re: Cleanup of some doclint warnings in java.lang

2013-06-17 Thread Chris Hegarty

Looks fine to me Joe,

Quite trivially, and optionally, the '@since 1.8 ' could be moved to 
after the @return in Short.java L406


-Chris.

On 17/06/2013 04:48, Joe Darcy wrote:

Hello,

Please review the patch below which resolves a subset of the doclint
warnings in java.lang.

Thanks,

-Joe

diff -r 45a3584bfacf src/share/classes/java/lang/Boolean.java
--- a/src/share/classes/java/lang/Boolean.java Fri Jun 14 15:14:56 2013
+0400
+++ b/src/share/classes/java/lang/Boolean.java Sun Jun 16 20:46:52 2013
-0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1994, 2013, 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
@@ -205,9 +205,9 @@
* Returns a hash code for a {@code boolean} value; compatible with
* {@code Boolean.hashCode()}.
*
+ * @param value the value to hash
+ * @return a hash code value for a {@code boolean} value.
* @since 1.8
- *
- * @return a hash code value for a {@code boolean} value.
*/
public static int hashCode(boolean value) {
return value ? 1231 : 1237;
diff -r 45a3584bfacf src/share/classes/java/lang/Byte.java
--- a/src/share/classes/java/lang/Byte.java Fri Jun 14 15:14:56 2013 +0400
+++ b/src/share/classes/java/lang/Byte.java Sun Jun 16 20:46:52 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 1996, 2013, 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
@@ -398,9 +398,9 @@
* Returns a hash code for a {@code byte} value; compatible with
* {@code Byte.hashCode()}.
*
+ * @param value the value to hash
+ * @return a hash code value for a {@code byte} value.
* @since 1.8
- *
- * @return a hash code value for a {@code byte} value.
*/
public static int hashCode(byte value) {
return (int)value;
diff -r 45a3584bfacf src/share/classes/java/lang/Class.java
--- a/src/share/classes/java/lang/Class.java Fri Jun 14 15:14:56 2013 +0400
+++ b/src/share/classes/java/lang/Class.java Sun Jun 16 20:46:52 2013 -0700
@@ -3141,6 +3141,8 @@
* could not be checked at runtime (because generic types are implemented
* by erasure).
*
+ * @param U the type to cast this class object to
+ * @param clazz the class of the type to cast this class object to
* @return this {@code Class} object, cast to represent a subclass of
* the specified class object.
* @throws ClassCastException if this {@code Class} object does not
@@ -3296,6 +3298,7 @@
* If this Class represents either the Object class, an interface type, an
* array type, a primitive type, or void, the return value is null.
*
+ * @return an object representing the superclass
* @since 1.8
*/
public AnnotatedType getAnnotatedSuperclass() {
@@ -3327,6 +3330,7 @@
* If this Class represents either the Object class, an array type, a
* primitive type, or void, the return value is an array of length 0.
*
+ * @return an array representing the superinterfaces
* @since 1.8
*/
public AnnotatedType[] getAnnotatedInterfaces() {
diff -r 45a3584bfacf src/share/classes/java/lang/Double.java
--- a/src/share/classes/java/lang/Double.java Fri Jun 14 15:14:56 2013
+0400
+++ b/src/share/classes/java/lang/Double.java Sun Jun 16 20:46:52 2013
-0700
@@ -453,7 +453,6 @@
* a {@code NumberFormatException} be thrown, the regular
* expression below can be used to screen the input string:
*
- * code
* pre
* final String Digits = (\\p{Digit}+);
* final String HexDigits = (\\p{XDigit}+);
@@ -500,7 +499,6 @@
* // Perform suitable alternative action
* }
* /pre
- * /code
*
* @param s the string to be parsed.
* @return a {@code Double} object holding the value
@@ -756,9 +754,9 @@
* Returns a hash code for a {@code double} value; compatible with
* {@code Double.hashCode()}.
*
+ * @param value the value to hash
+ * @return a hash code value for a {@code double} value.
* @since 1.8
- *
- * @return a hash code value for a {@code double} value.
*/
public static int hashCode(double value) {
long bits = doubleToLongBits(value);
diff -r 45a3584bfacf src/share/classes/java/lang/Float.java
--- a/src/share/classes/java/lang/Float.java Fri Jun 14 15:14:56 2013 +0400
+++ b/src/share/classes/java/lang/Float.java Sun Jun 16 20:46:52 2013 -0700
@@ -664,9 +664,9 @@
* Returns a hash code for a {@code float} value; compatible with
* {@code Float.hashCode()}.
*
+ * @param value the value to hash
+ * @return a hash code value for a {@code float} value.
* @since 1.8
- *
- * @return a hash code value for a {@code float} value.
*/
public static int hashCode(float value) {
return floatToIntBits(value);
diff -r 45a3584bfacf src/share/classes/java/lang/Integer.java
--- a/src/share/classes/java/lang/Integer.java Fri Jun 14 15:14:56 2013
+0400
+++ b/src/share/classes/java/lang/Integer.java Sun Jun 16 20:46:52 

Cleanup of some doclint warnings in java.lang

2013-06-16 Thread Joe Darcy

Hello,

Please review the patch below which resolves a subset of the doclint 
warnings in java.lang.


Thanks,

-Joe

diff -r 45a3584bfacf src/share/classes/java/lang/Boolean.java
--- a/src/share/classes/java/lang/Boolean.javaFri Jun 14 15:14:56 
2013 +0400
+++ b/src/share/classes/java/lang/Boolean.javaSun Jun 16 20:46:52 
2013 -0700

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1994, 2013, 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
@@ -205,9 +205,9 @@
  * Returns a hash code for a {@code boolean} value; compatible with
  * {@code Boolean.hashCode()}.
  *
+ * @param value the value to hash
+ * @return a hash code value for a {@code boolean} value.
  * @since 1.8
- *
- * @return a hash code value for a {@code boolean} value.
  */
 public static int hashCode(boolean value) {
 return value ? 1231 : 1237;
diff -r 45a3584bfacf src/share/classes/java/lang/Byte.java
--- a/src/share/classes/java/lang/Byte.javaFri Jun 14 15:14:56 2013 
+0400
+++ b/src/share/classes/java/lang/Byte.javaSun Jun 16 20:46:52 2013 
-0700

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights 
reserved.
+ * Copyright (c) 1996, 2013, 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
@@ -398,9 +398,9 @@
  * Returns a hash code for a {@code byte} value; compatible with
  * {@code Byte.hashCode()}.
  *
+ * @param value the value to hash
+ * @return a hash code value for a {@code byte} value.
  * @since 1.8
- *
- * @return a hash code value for a {@code byte} value.
  */
 public static int hashCode(byte value) {
 return (int)value;
diff -r 45a3584bfacf src/share/classes/java/lang/Class.java
--- a/src/share/classes/java/lang/Class.javaFri Jun 14 15:14:56 2013 
+0400
+++ b/src/share/classes/java/lang/Class.javaSun Jun 16 20:46:52 2013 
-0700

@@ -3141,6 +3141,8 @@
  * could not be checked at runtime (because generic types are 
implemented

  * by erasure).
  *
+ * @param U the type to cast this class object to
+ * @param clazz the class of the type to cast this class object to
  * @return this {@code Class} object, cast to represent a subclass of
  *the specified class object.
  * @throws ClassCastException if this {@code Class} object does not
@@ -3296,6 +3298,7 @@
  * If this Class represents either the Object class, an interface 
type, an

  * array type, a primitive type, or void, the return value is null.
  *
+ * @return an object representing the superclass
  * @since 1.8
  */
 public AnnotatedType getAnnotatedSuperclass() {
@@ -3327,6 +3330,7 @@
  * If this Class represents either the Object class, an array type, a
  * primitive type, or void, the return value is an array of length 0.
  *
+ * @return an array representing the superinterfaces
  * @since 1.8
  */
 public AnnotatedType[] getAnnotatedInterfaces() {
diff -r 45a3584bfacf src/share/classes/java/lang/Double.java
--- a/src/share/classes/java/lang/Double.javaFri Jun 14 15:14:56 
2013 +0400
+++ b/src/share/classes/java/lang/Double.javaSun Jun 16 20:46:52 
2013 -0700

@@ -453,7 +453,6 @@
  * a {@code NumberFormatException} be thrown, the regular
  * expression below can be used to screen the input string:
  *
- * code
  * pre
  *  final String Digits = (\\p{Digit}+);
  *  final String HexDigits  = (\\p{XDigit}+);
@@ -500,7 +499,6 @@
  *  // Perform suitable alternative action
  *  }
  * /pre
- * /code
  *
  * @param  s   the string to be parsed.
  * @return a {@code Double} object holding the value
@@ -756,9 +754,9 @@
  * Returns a hash code for a {@code double} value; compatible with
  * {@code Double.hashCode()}.
  *
+ * @param value the value to hash
+ * @return a hash code value for a {@code double} value.
  * @since 1.8
- *
- * @return a hash code value for a {@code double} value.
  */
 public static int hashCode(double value) {
 long bits = doubleToLongBits(value);
diff -r 45a3584bfacf src/share/classes/java/lang/Float.java
--- a/src/share/classes/java/lang/Float.javaFri Jun 14 15:14:56 2013 
+0400
+++ b/src/share/classes/java/lang/Float.javaSun Jun 16 20:46:52 2013 
-0700

@@ -664,9 +664,9 @@
  * Returns a hash code for a {@code float} value; compatible with
  * {@code Float.hashCode()}.
  *
+ * @param value the value to hash
+ * @return a hash code value for a {@code float} value.
  * @since 1.8
- *
-