forked from phoedos/pmd
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:
@ -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.
|
||||
//
|
||||
|
Reference in New Issue
Block a user