提交 357450ce 编写于 作者: D darcy

4881419: The type of X[].clone() should be X[]

Reviewed-by: martin
上级 07e1c2bd
...@@ -189,7 +189,9 @@ public class Object { ...@@ -189,7 +189,9 @@ public class Object {
* specific cloning operation. First, if the class of this object does * specific cloning operation. First, if the class of this object does
* not implement the interface {@code Cloneable}, then a * not implement the interface {@code Cloneable}, then a
* {@code CloneNotSupportedException} is thrown. Note that all arrays * {@code CloneNotSupportedException} is thrown. Note that all arrays
* are considered to implement the interface {@code Cloneable}. * are considered to implement the interface {@code Cloneable} and that
* the return type of the {@code clone} method of an array type {@code T[]}
* is {@code T[]} where T is any reference or primitive type.
* Otherwise, this method creates a new instance of the class of this * Otherwise, this method creates a new instance of the class of this
* object and initializes all its fields with exactly the contents of * object and initializes all its fields with exactly the contents of
* the corresponding fields of this object, as if by assignment; the * the corresponding fields of this object, as if by assignment; the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册