optimized toArray conversion

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4530 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Brian Remedios
2006-09-23 15:21:57 +00:00
parent 9a3ec16874
commit 9a7c7b6085

View File

@ -51,7 +51,7 @@ public class RuleSets {
* @return RuleSet[]
*/
public RuleSet[] getAllRuleSets() {
return (RuleSet[]) ruleSets.toArray(new RuleSet[0]);
return (RuleSet[]) ruleSets.toArray(new RuleSet[ruleSets.size()]);
}
public Iterator getRuleSetsIterator() {