Changeset 16908 in josm


Ignore:
Timestamp:
2020-08-23T12:39:30+02:00 (4 years ago)
Author:
simon04
Message:

fix #19685, see #11593 - Fix NPE in JavaCC ParseException

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r16898 r16908  
    248248        <mkdir dir="${mapcss.dir}/parsergen"/>
    249249        <java classname="javacc" fork="true" failonerror="true">
     250            <classpath path="${tools.dir}/javacc"/>
    250251            <classpath refid="javacc.classpath"/>
    251252            <arg value="-DEBUG_PARSER=false"/>
  • trunk/tools/javacc/templates/ParseException.template

    r16907 r16908  
    120120    }
    121121#if KEEP_LINE_COLUMN
    122     retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
     122    if (currentToken.next != null) {
     123      retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
     124    }
    123125#fi
    124126    retval += "." + EOL;
Note: See TracChangeset for help on using the changeset viewer.