forked from phoedos/pmd
Bug fix [ 1811828 ] RuntimeException in RuleSetFactory
At least the second part from the comments about the ArrayIndexOutOfBoundsException is fixed by this change git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5604 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -185,8 +185,10 @@ class RuleSetWriterImpl implements IRuleSetWriter {
|
||||
final Element descriptionElement = getDescriptionElement(doc, rule.getDescription());
|
||||
ruleElement.appendChild(descriptionElement);
|
||||
|
||||
final Element exampleElement = getExampleElement(doc, rule.getExamples().get(0).toString());
|
||||
ruleElement.appendChild(exampleElement);
|
||||
if (rule.getExamples().size() > 0) {
|
||||
final Element exampleElement = getExampleElement(doc, rule.getExamples().get(0).toString());
|
||||
ruleElement.appendChild(exampleElement);
|
||||
}
|
||||
|
||||
final Element priorityElement = getPriorityElement(doc, rule.getPriority());
|
||||
ruleElement.appendChild(priorityElement);
|
||||
|
Reference in New Issue
Block a user