Fixed potential NullPointerException.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1385 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Don Leckie
2003-01-28 04:10:06 +00:00
parent 02a624bc43
commit 9135daf8d8

View File

@ -12,6 +12,7 @@ import net.sourceforge.pmd.swingui.event.RulesTreeModelEvent;
import net.sourceforge.pmd.swingui.event.RulesTreeModelEventListener;
import javax.swing.tree.DefaultTreeModel;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Enumeration;
@ -169,6 +170,11 @@ class RulesTreeModel
List ruleSetList = m_pmdDirectoryReturnedEventHandler.getRuleSetList();
if (ruleSetList == null)
{
ruleSetList = new ArrayList();
}
//
// Sort the rule sets by name in ascending order.
//