mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8258804: Collection.toArray() should use empty array
Reviewed-by: mullan
This commit is contained in:
parent
9e463d1a88
commit
39e03a0b2c
2 changed files with 3 additions and 3 deletions
|
@ -851,7 +851,7 @@ public abstract class SSLContextImpl extends SSLContextSpi {
|
|||
} else {
|
||||
// Use the customized TLS protocols.
|
||||
candidates =
|
||||
refactored.toArray(new ProtocolVersion[refactored.size()]);
|
||||
refactored.toArray(new ProtocolVersion[0]);
|
||||
}
|
||||
|
||||
return getAvailableProtocols(candidates);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -424,6 +424,6 @@ final class SunX509KeyManagerImpl extends X509ExtendedKeyManager {
|
|||
}
|
||||
}
|
||||
}
|
||||
return list.toArray(new X500Principal[list.size()]);
|
||||
return list.toArray(new X500Principal[0]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue