Spring Roo
  1. Spring Roo
  2. ROO-3106

Spring Roo doesn't support new Java 7 language features

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 1.2.1.RELEASE
    • Fix Version/s: 1.2.4.RELEASE
    • Component/s: None
    • Labels:
      None

      Description

      Java 7 new language features do not work in Roo. The following has been tested:

      • Underscore Between Literals
        public static final int TEST = 1_000_000;
        

        Roo error: Encountered " <IDENTIFIER> "_000_000 "" at line 18, column 41.

      • Diamond Syntax:
        List<String> list = new ArrayList<>();
        

        Roo error: Encountered " "<" "< "" at line 23, column 42.

      • Try with Resources
        try (FileInputStream in = new FileInputStream("readme.txt")) 
        {          
            System.out.println(in.read());
        }...
        

        Roo error: Encountered " "}" "} "" at line 19, column 9.

      Japa (Java Parser used in Roo) is obsolete project that supports 1.5
      Either japa should be modified or new java parser selected for future releases.

        Issue Links

          Activity

          Hi Mike,

          I've found some problems in classpath-javaparser project.

          I think it's worth you to take a look at ROO-3340, ROO-3341.

          Also ROO-3335 is related to this issue.

          Regards.
          Chema.

          Show
          Jose Manuel Vivó ( Chema ) - DiSiD Technologies S.L. added a comment - Hi Mike, I've found some problems in classpath-javaparser project. I think it's worth you to take a look at ROO-3340 , ROO-3341 . Also ROO-3335 is related to this issue. Regards. Chema.
          Hide
          Mike De Haan added a comment -

          Thanks!

          I've merged in changes from ROO-3340 and ROO-3341 and submitted a new pull request.

          Show
          Mike De Haan added a comment - Thanks! I've merged in changes from ROO-3340 and ROO-3341 and submitted a new pull request.
          Hide
          Alan Stewart added a comment -

          Would those interested please try out the new Roo code and exercise the Java 7 features.
          Thanks
          Alan

          Show
          Alan Stewart added a comment - Would those interested please try out the new Roo code and exercise the Java 7 features. Thanks Alan
          Hide
          Daniel Serodio added a comment -

          Alan, I'm interested. What's the fork/branch I should check?

          Show
          Daniel Serodio added a comment - Alan, I'm interested. What's the fork/branch I should check?
          Hide
          Mike De Haan added a comment -

          Daniel,

          You can checkout the master branch. The changes should be there.

          Show
          Mike De Haan added a comment - Daniel, You can checkout the master branch. The changes should be there.

            People

            • Assignee:
              Alan Stewart
              Reporter:
              Vladimir Tihomirov
            • Votes:
              12 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: