Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-805

Method calls on a separate line should be supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-1
    • 1.0-JSR-3
    • None
    • None

    Description

      Java constructs like chainable setters or builders are currently not possible with Groovy JSR since method calls can't sit on a separate line. For instance:

      someobject
      .enterElement("groovy/test_groovy2elementinfo1.groovy")
      .setId("ELEMENT1")
      .setUrl("/test/element1")
      .leaveElement();

      A suggested solution would be to eat newlines and whitespaces before . operators, just as for {

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            gbevin Geert Bevin
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: