Set exclude marker on parser to fix NPE.

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6574 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Ryan Gustafson 2008-10-07 01:57:12 +00:00
parent 4ac13741ab
commit 718ef77283
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ Fixed bug 1481051 - false + UnusedNullCheckInEquals (and other false positives t
Fixed bug 1943204 - Ant task: <ruleset> path should be relative to Ant basedir
Fixed ClassCastException on generic method in BeanMembersShouldSerialize
Fixed ClassCastException in symbol table code
Fixed NullPointerExcepton in Rule Designer due to uninitialized exclude marker
August 31, 2008 - 4.2.3:

View File

@ -129,6 +129,7 @@ public class Designer implements ClipboardOwner {
private SimpleNode getCompilationUnit() {
SourceTypeHandler handler = SourceTypeHandlerBroker.getVisitorsFactoryForSourceType(getSourceType());
Parser parser = handler.getParser();
parser.setExcludeMarker(PMD.EXCLUDE_MARKER);
SimpleNode simpleNode = (SimpleNode)parser.parse(new StringReader(codeEditorPane.getText()));
handler.getSymbolFacade().start(simpleNode);
handler.getTypeResolutionFacade(null).start(simpleNode);