Fix Version/s: None
Java 10 is going to be released by end of March 2018 (GA: 2018/03/20). SonarJava should be able to parse Java 10 code without failing with parse errors.
The main change is the introduction of the var reserved keyword as per defined here: http://openjdk.java.net/jeps/286
A local variable defined with var will see its type automatically inferred by the compiler.
At best, we should try to infer the variable type in the same way the compiler will do it but if this is not achievable in the timebox we decided to allocate to this task, this will be adjusted in another version of SonarJava.
296: Consolidate the JDK Forest into a Single Repository
304: Garbage-Collector Interface
307: Parallel Full GC for G1
310: Application Class-Data Sharing
312: Thread-Local Handshakes
313: Remove the Native-Header Generation Tool (javah)
314: Additional Unicode Language-Tag Extensions
316: Heap Allocation on Alternative Memory Devices
317: Experimental Java-Based JIT Compiler
319: Root Certificates
322: Time-Based Release Versioning
- We are currently using ASM 6.0. We need in theory to upgrade to ASM 6.1 to be able to read the bytecode generated by Java 10. See: http://asm.ow2.org/history.html. According to Evgeny who tried to embed ASM 6.1 in JaCoCo, we should not do that because of the regressions discovered. Using ASM 6.1.1 or a custom build based on the 6.0 just supporting Java 10 would be a better option.
- JaCoCo? We embed JaCoCo 0.8
- Evgeny worked on JaCoCo 0.8.1 to support Java 10: https://github.com/jacoco/jacoco/pull/629
- JaCoCo 0.8.1 has been released on 22 March 2018: https://github.com/jacoco/jacoco/releases/download/v0.8.1/jacoco-0.8.1.zip
- PR merged into SonarJava: https://github.com/SonarSource/sonar-java/pull/1951