From 9a7c7b60852f7f46c9e477cb13f178b8595ea1f2 Mon Sep 17 00:00:00 2001 From: Brian Remedios Date: Sat, 23 Sep 2006 15:21:57 +0000 Subject: [PATCH] optimized toArray conversion git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4530 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/src/net/sourceforge/pmd/RuleSets.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd/src/net/sourceforge/pmd/RuleSets.java b/pmd/src/net/sourceforge/pmd/RuleSets.java index 2006b3bf25..2336a51d83 100644 --- a/pmd/src/net/sourceforge/pmd/RuleSets.java +++ b/pmd/src/net/sourceforge/pmd/RuleSets.java @@ -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() {