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


With regards,
Apache Git Services

Reply via email to