Author Topic: Beta 2: java lambda operator mutilated by beautifier  (Read 844 times)

Marcel

  • Senior Community Member
  • Posts: 205
  • Hero Points: 25
Beta 2: java lambda operator mutilated by beautifier
« on: September 03, 2014, 10:08:25 pm »
When running the java beautifier against a selection containing a lambda expression, the arrow token is incorrectly handled.  Note that the first arrow token was broken apart and the second token lost its leading space. 
Beautifying an entire file seems to work ok.

Before:

  private void lookForSomething() {
    try {
      Files.walk(new File(".").toPath()).filter(p -> p.getFileName().toString().endsWith(".jazz")).forEach((Path path) -> {
        System.out.println("Found one " + path);
      });
    } catch (IOException ex) {
      System.out.println(".....");
    }
  }

After:

private void lookForSomething() {
  try {
    Files.walk(new File(".").toPath()).filter(p - > p.getFileName().toString().endsWith(".jazz")).forEach((Path path)-> {
      System.out.println("Found one " + path);
    });
  } catch (IOException ex) {
    System.out.println(".....");
  }
}

« Last Edit: September 03, 2014, 10:10:00 pm by Marcel »

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1046
  • Hero Points: 92
Re: Beta 2: java lambda operator mutilated by beautifier
« Reply #1 on: September 04, 2014, 05:16:34 pm »
Reproduced with some selections.  I'll take a look at it, thanks for the report.