Open KOLANICH opened 3 years ago
One thing to note is that the <>
syntax was only added in java 7: https://docs.oracle.com/javase/tutorial/java/generics/types.html#diamond
Java <= 6 classfiles would have to be decompiled with the explicit syntax.
Thanks for the info. I didn't know how it is called, so just compiled setting source version to 6, and it has been compiled. I guess since it is a 7 feature, it is out of scope here, as it is written in contributing.md:
Not great things to contribute
...
- Java above 6. See above. I know. But it's all syntactic sugar anyway. cough. Anyway, you get to work with $$FUNKY_NEW_LANGUAGE$$ in your day job.
Sorry, I think you misunderstood. I meant if the classfile you are decompiling is not Java 7, then the <>
expression can not be used.
It is not related to the version of Java CFR is compiled with.
You should reopen the issue, it is still valid.
OK, if @leibnitz27 decided it is out of scope, he would have closed this issue himself anyway.
Problem solved by this feature
CFR decompiles generics declarations + assignments suboptimally:
(excerpts from https://github.com/trung/InMemoryJavaCompiler )
Feature description
Should decompile as in
-
lines.