Michael1993 commented on a change in pull request #462: General Code Cleanup
URL: https://github.com/apache/commons-lang/pull/462#discussion_r332223874
##########
File path: src/main/java/org/apache/commons/lang3/CharSet.java
##########
@@ -225,7 +225,7 @@ protected void add(final String str) {
// NOTE: This is no longer public as CharRange is no longer a public class.
// It may be replaced when CharSet moves to Range.
/*public*/ CharRange[] getCharRanges() {
- return set.toArray(new CharRange[set.size()]);
+ return set.toArray(new CharRange[0]);
Review comment:
My bad, that came with Java 11, I was thinking of `stream().toArray()`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services