Skip to content
Permalink
Browse files
8258804: Collection.toArray() should use empty array
Reviewed-by: mullan
  • Loading branch information
XueleiFan committed Dec 22, 2020
1 parent 9e463d1 commit 39e03a0b2cbe85eb8fe20d45ff3c538e70e3332c
@@ -851,7 +851,7 @@ private static void populate(String propname,
} 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 @@ public String chooseEngineServerAlias(String keyType,
}
}
}
return list.toArray(new X500Principal[list.size()]);
return list.toArray(new X500Principal[0]);
}
}

1 comment on commit 39e03a0

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 39e03a0 Dec 22, 2020

Please sign in to comment.