Uploaded image for project: 'Minimal Marketable Features'
  1. Minimal Marketable Features
  2. MMF-1261

Make SonarJava supporting the analyzis of Java 10 projects

    Details

    • Type: MMF
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:

      Description

      Why

      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.

      References:

      What

      JEP 286: Local-Variable Type Inference

      https://bugs.openjdk.java.net/browse/JDK-8151454

      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.

       
      var list = new ArrayList<String>(); // infers ArrayList<String> 
      var stream = list.stream(); // infers Stream<String> 
      

      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.

      Others JEPs

      Action: none

      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

      How

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alexandre.gigleux Alexandre Gigleux
                Reporter:
                alexandre.gigleux Alexandre Gigleux
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: