mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +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
|
@ -95,7 +95,7 @@ class PollingWatchService
|
|||
throws IOException
|
||||
{
|
||||
// check events - CCE will be thrown if there are invalid elements
|
||||
final Set<WatchEvent.Kind<?>> eventSet = new HashSet<>(events.length);
|
||||
final Set<WatchEvent.Kind<?>> eventSet = HashSet.newHashSet(events.length);
|
||||
for (WatchEvent.Kind<?> event: events) {
|
||||
// standard events
|
||||
if (event == StandardWatchEventKinds.ENTRY_CREATE ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue