This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 37988

Summary: PMDException: Error while parsing test
Product: third-party Reporter: moshiX <moshix>
Component: -- Other --Assignee: issues@contrib <issues>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P4    
Version: 3.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description moshiX 2003-12-10 16:17:16 UTC
When the real-time PMD is enabled the following
exception is thrown while the text is editted (and
the syntax is invalid since I'm in the middle of
the word...)

net.sourceforge.pmd.PMDException: Error while
parsing test
	at net.sourceforge.pmd.PMD.processFile(PMD.java:75)
	at
pmd.RunPMDAction.checkCookies(RunPMDAction.java:196)
	at
pmd.RunPMDAction.checkCookies(RunPMDAction.java:149)
	at pmd.scan.Scanner.run(Scanner.java:61)
	at java.lang.Thread.run(Thread.java:534)
Caused by: net.sourceforge.pmd.ast.ParseException:
Encountered "new" at line 46, column 9.
Was expecting one of:
    ";" ...
    "=" ...
    "++" ...
    "--" ...
    "+=" ...
    "-=" ...
    "*=" ...
    "/=" ...
    "&=" ...
    "|=" ...
    "^=" ...
    "%=" ...
    "<<=" ...
    ">>=" ...
    ">>>=" ...
    "." ...
    "[" ...
    "(" ...
    ":" ...
    <IDENTIFIER> ...
    
	at
net.sourceforge.pmd.ast.JavaParser.generateParseException(JavaParser.java:8631)
	at
net.sourceforge.pmd.ast.JavaParser.jj_consume_token(JavaParser.java:8509)
	at
net.sourceforge.pmd.ast.JavaParser.Statement(JavaParser.java:3285)
	at
net.sourceforge.pmd.ast.JavaParser.BlockStatement(JavaParser.java:3435)
	at
net.sourceforge.pmd.ast.JavaParser.Block(JavaParser.java:3391)
	at
net.sourceforge.pmd.ast.JavaParser.MethodDeclaration(JavaParser.java:1308)
	at
net.sourceforge.pmd.ast.JavaParser.ClassBodyDeclaration(JavaParser.java:507)
	at
net.sourceforge.pmd.ast.JavaParser.ClassBody(JavaParser.java:389)
	at
net.sourceforge.pmd.ast.JavaParser.UnmodifiedClassDeclaration(JavaParser.java:326)
	at
net.sourceforge.pmd.ast.JavaParser.ClassDeclaration(JavaParser.java:277)
	at
net.sourceforge.pmd.ast.JavaParser.TypeDeclaration(JavaParser.java:193)
	at
net.sourceforge.pmd.ast.JavaParser.CompilationUnit(JavaParser.java:72)
	at net.sourceforge.pmd.PMD.processFile(PMD.java:66)
	at
pmd.RunPMDAction.checkCookies(RunPMDAction.java:196)
	at
pmd.RunPMDAction.checkCookies(RunPMDAction.java:149)
	at pmd.scan.Scanner.run(Scanner.java:61)
[catch] at java.lang.Thread.run(Thread.java:534)
Comment 1 Jesse Glick 2003-12-10 17:46:42 UTC
Just using the PMD <-> NetBeans integration module, i.e.

	pmd [0.91]

or similar in your ide.log (rather than e.g. only when using the
TaskList integration module)? Please refile the bug on pmd.sf.net
where that module is developed. netbeans.org just picks up binaries of
the module.