Skip to content

Commit 79ac0fd

Browse files
authored
Remove use of deprecated exception class (#1086)
The `nashorn` ParserException is triggering compiler erros under certain JDK-IntelliJ configuration. This change fixes the errors. The old exception class is not caught anywhere explicitly and has been deprecated in JDK11. Found together with @ml86.
1 parent c0f34de commit 79ac0fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fuzzyc2cpg/src/main/scala/io/shiftleft/fuzzyc2cpg/passes/astcreation/AntlrParserDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
import io.shiftleft.fuzzyc2cpg.ast.logical.statements.CompoundStatement;
1111
import io.shiftleft.fuzzyc2cpg.parser.AntlrParserDriverObserver;
1212
import io.shiftleft.fuzzyc2cpg.parser.CommonParserContext;
13+
import io.shiftleft.fuzzyc2cpg.parser.ParserException;
1314
import io.shiftleft.fuzzyc2cpg.parser.TokenSubStream;
1415
import io.shiftleft.passes.DiffGraph;
1516
import java.io.IOException;
1617
import java.util.ArrayList;
1718
import java.util.List;
1819
import java.util.Stack;
1920
import java.util.function.Consumer;
20-
import jdk.nashorn.internal.runtime.ParserException;
2121
import org.antlr.v4.runtime.BailErrorStrategy;
2222
import org.antlr.v4.runtime.CharStream;
2323
import org.antlr.v4.runtime.CharStreams;
@@ -129,7 +129,7 @@ public ParseTree parseTokenStream(TokenSubStream tokens)
129129
throws ParserException {
130130
ParseTree returnTree = parseTokenStreamImpl(tokens);
131131
if (returnTree == null) {
132-
throw new ParserException("");
132+
throw new ParserException();
133133
}
134134
return returnTree;
135135
}

0 commit comments

Comments
 (0)