Java 6 parser crashes with NullPointerException on Java 7 input

Issue #275 new
Jesper Öqvist created an issue

ExtendJ 8.1.0-26-g4f6c910 Java SE 6

The Java 6 parser crashes when trying to parse the file src/main/org/apache/tools/ant/taskdefs/ from Apache Ant 1.10.1. The parser should print an error message instead.

This is the stack trace printed by ExtendJ:

Fatal exception:
java.lang.Error: ./src/main/org/apache/tools/ant/taskdefs/ null
        at org.extendj.ast.ClassSource.parseCompilationUnit(
        at org.extendj.ast.PathPart.getCompilationUnit(
        at org.extendj.ast.Program.addSourceFile(
        at org.extendj.JavaDumpTree.main(
Caused by: java.lang.NullPointerException
        at beaver.Parser$TokenStream.remove(
        at beaver.Parser.recoverFromError(
        at org.extendj.parser.JavaParser.recoverFromError(
        at beaver.Parser.parse(
        at beaver.Parser.parse(
        at org.extendj.parser.JavaParser.parse(
        at org.extendj.ast.Program$2.parse(
        at org.extendj.ast.ClassSource.parseCompilationUnit(

Comments (0)

  1. Log in to comment