Make the code compile with JFlex 1.7

This commit is contained in:
Mikolaj Izdebski 2019-06-07 10:02:22 +02:00
parent 992e3f8df1
commit 256bc86d4e

View File

@ -54,6 +54,10 @@ rm -rf bootstrap
%pom_xpath_set pom:workingDirectory '${basedir}/src/main/java/com/thoughtworks/qdox/parser/impl'
# Compatibility with JFlex 1.7.0
sed -i 's/JFlexLexer(\(.*\))/JFlexLexer(new java.io.InputStreamReader((\1), java.nio.charset.Charset.forName("UTF-8")))/' \
src/main/java/com/thoughtworks/qdox/library/ClassLoaderLibrary.java
%build
# Generate scanners (upstream does this with maven-jflex-plugin)
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex