You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/10/07 20:05:57 UTC

[GitHub] [commons-lang] Michael1993 commented on a change in pull request #462: General Code Cleanup

Michael1993 commented on a change in pull request #462: General Code Cleanup
URL: https://github.com/apache/commons-lang/pull/462#discussion_r332210642
 
 

 ##########
 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:
   Why not just CharRange[]::new?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services