Skip to content

Commit 09a6cbf

Browse files
committed
Added findbugs optimisation: 'http://findbugs.sourceforge.net/bugDescriptions.html#ITA_INEFFICIENT_TO_ARRAY'. Pass in a correctly sized array to list.toArray
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@490424 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4109764 commit 09a6cbf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/java/org/apache/commons/io/FilenameUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ static String[] splitOnTokens(String text) {
12431243
list.add(buffer.toString());
12441244
}
12451245

1246-
return (String[]) list.toArray(new String[0]);
1246+
return (String[]) list.toArray( new String[ list.size() ] );
12471247
}
12481248

12491249
}

0 commit comments

Comments
 (0)