You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Javacc throws an Error on invalid escapes, which isn't caught, so it crashes the whole program. It also doesn't mention the filename.
Exception Stacktrace:
Exception in thread "main" java.lang.Error: Invalid escape character at line 1 column 2.
at net.sourceforge.pmd.lang.ast.JavaCharStream.readChar(JavaCharStream.java:331)
at net.sourceforge.pmd.lang.ast.JavaCharStream.BeginToken(JavaCharStream.java:193)
at net.sourceforge.pmd.lang.java.ast.JavaParserTokenManager.getNextToken(JavaParserTokenManager.java:2271)
at net.sourceforge.pmd.lang.java.ast.JavaParser.<init>(JavaParser.java:12555)
at net.sourceforge.pmd.lang.java.AbstractJavaParser.createJavaParser(AbstractJavaParser.java:46)
at net.sourceforge.pmd.lang.java.JavaLanguageParser.createJavaParser(JavaLanguageParser.java:41)
at net.sourceforge.pmd.lang.java.AbstractJavaParser.parse(AbstractJavaParser.java:62)
at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:121)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:185)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:24)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Code Sample demonstrating the issue:
\u00k0 // not a valid unicode escape because k is not a valid hex digit
Steps to reproduce:
analyse a file with an invalid escape like above
Running PMD through: any
The text was updated successfully, but these errors were encountered:
Affects PMD Version: 6.23.0
Description: Javacc throws an Error on invalid escapes, which isn't caught, so it crashes the whole program. It also doesn't mention the filename.
Exception Stacktrace:
Code Sample demonstrating the issue:
Steps to reproduce:
Running PMD through: any
The text was updated successfully, but these errors were encountered: