mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Use array.clone() instead of manual array creation
This commit is contained in:
committed by
Juergen Hoeller
parent
f61d728db9
commit
f2b3953d76
+1
-2
@@ -48,8 +48,7 @@ public class SimpleKey implements Serializable {
|
||||
*/
|
||||
public SimpleKey(Object... elements) {
|
||||
Assert.notNull(elements, "Elements must not be null");
|
||||
this.params = new Object[elements.length];
|
||||
System.arraycopy(elements, 0, this.params, 0, elements.length);
|
||||
this.params = elements.clone();
|
||||
this.hashCode = Arrays.deepHashCode(this.params);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user