RFR: 8301120: Cleanup utility classes java.util.Arrays and java.util.Collections
Tagir F. Valeev
tvaleev at openjdk.org
Wed Jan 25 21:48:48 UTC 2023
number of minor cleanups could be done in Arrays and Collections utility classes.
In Arrays:
- Redundant import jdk.internal.misc.Unsafe;
- C-style array declaration is used in public static boolean equals(short[] a, short a2[]) (that's the only place in the whole file)
- Redundant casts to Object type in comparisons like (Object)newType == (Object)Object[].class
In Collections:
- A few obsolete "unchecked" and "rawtypes" suppressions
- Unnecessary local variable initializer in get() method
- Raw type can be avoided in a number of casts
- Explicit type parameters could be omitted or converted to diamonds
- A couple of javadoc links on private APIs are malformed
-------------
Commit messages:
- Cleanup
Changes: https://git.openjdk.org/jdk/pull/12207/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12207&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8301120
Stats: 30 lines in 2 files changed: 0 ins; 6 del; 24 mod
Patch: https://git.openjdk.org/jdk/pull/12207.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12207/head:pull/12207
PR: https://git.openjdk.org/jdk/pull/12207
More information about the core-libs-dev
mailing list