mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8274835: Remove unnecessary castings in java.base
Reviewed-by: mullan, naoto, lancea, bpb
This commit is contained in:
parent
3b2585c02b
commit
5a2452c80e
15 changed files with 32 additions and 35 deletions
|
@ -335,7 +335,7 @@ public class HashSet<E>
|
|||
.checkArray(s, Map.Entry[].class, HashMap.tableSizeFor(capacity));
|
||||
|
||||
// Create backing HashMap
|
||||
map = (((HashSet<?>)this) instanceof LinkedHashSet ?
|
||||
map = (this instanceof LinkedHashSet ?
|
||||
new LinkedHashMap<>(capacity, loadFactor) :
|
||||
new HashMap<>(capacity, loadFactor));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue