Closed zdu-strong closed 7 months ago
I'll take a look. On some of the compilers of newer JDKs, Java generates code that uses a lot of runtime code generation for string concatenation, and this code generation isn't documented too well, so it's been hard to get the code analysis for that stuff to work right.
Concatenation of 2 things probably works fine, so if you need a workaround while I figure out what's going on, you could try something like:
select((s) -> {
String temp = s.getName() + "a";
return temp + "b";
}
Thank you so much.
It turns out, I simply wasn't handling string literals that were more than one character long. When I was trying to figure out the lambda stuff, I kept reversing and unreversing the passed in values to make things consistent, but as a result, I ended up reversing string literals that were longer than a single character.
Maven should now have a version 2.02 and 1.8.37 that should fix this issue.
The concatenation of strings was not as expected.
Expected: "a" + "b" + "c" = "abc"
Actual: "a" + "b" + "c" = "cba"
My Repository: https://github.com/zdu-strong/Temp_Test_Of_Jinq Require Enviroment: java v21 Run Command: ./mvn clean test