mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8284780: Need methods to create pre-sized HashSet and LinkedHashSet
Reviewed-by: naoto, bpb, dfuchs, ascarpino
This commit is contained in:
parent
a941bc2de6
commit
e01cd7c3ed
29 changed files with 147 additions and 47 deletions
|
@ -310,7 +310,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
|||
interfaceNames = new String[]{interfaceName};
|
||||
} else {
|
||||
// Assure no duplicate interfaces (ClassFormatError)
|
||||
Set<String> itfs = new LinkedHashSet<>(altInterfaces.length + 1);
|
||||
Set<String> itfs = LinkedHashSet.newLinkedHashSet(altInterfaces.length + 1);
|
||||
itfs.add(interfaceName);
|
||||
for (Class<?> i : altInterfaces) {
|
||||
itfs.add(i.getName().replace('.', '/'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue