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

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
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: 1818
  • Hero Points: 151
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.