-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problem with string concatenation with parboiled java 1.4.1 #203
Comments
Thank you, @plamaiziere, for this bug report. |
@sirthias hello |
See: sirthias/parboiled#203 For some reason, when upgrading beyond Java 8 something about String concatenation optimizations breaks Parboiled. This is a workaround to let us keep moving forward despite using this unmaintained library. commit-id:4b660bb9
Hello,
I use parboiled since a long time to parse some routers configuration files. I've got a lot of test cases to test the parsers results.
With version 1.4.1 few test cases fail when, in the parser rules, i use string concatenation wih the '+' operator.
If I replace the '+' operator with the String.concat method this works fine.
Exemple:
In a test case for this rule like "ack rst psh fin syn urg", flags are set with the match() value, (ie ack, fin, psh etc), but without the "+" at the start as if the string + operator does nothing.
If I replace the + operator with String.concat it works fine :
_ace.getTcpFlags().add("+".concat(match()))
I tried with jdk11, jdk16 with the same problem. Also tried to use asm 9.3 instead asm 9.2.
All works fine if I specify 8 in the maven compiler plugin.
I think there is something wrong with the String + operator and ASM but I cannot reproduce this problem with a simple test parser
Any clue?
Thanks regards,
The text was updated successfully, but these errors were encountered: