For some reason, large regex patterns defined in app-code are inserted on a new line after the opening quotes of the pattern in generated java code.
If I make the regex small enough, the newline disappears.

WebDSL Code

  function validateEmail(mail : String) : Bool {
    return /([a-zA-Z0-9_\-\.])+@(([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})|(([a-zA-Z0-9\-]+\.)+)([a-zA-Z]{2,4}))/.match(mail);
  }

Generated code

  public static Boolean validateEmail_(String mail0)
  { 
    return java.util.regex.Pattern.compile("
    ([a-zA-Z0-9_\\-\\.])+@(([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})|(([a-zA-Z0-9\\-]+\\.)+)([a-zA-Z]{2,4}))").matcher(mail0).matches();
  }
Submitted by Elmer van Chastelet on 21 June 2012 at 14:44

On 21 June 2012 at 14:44 Elmer van Chastelet tagged error

On 21 June 2012 at 14:44 Elmer van Chastelet tagged 1.3.0

On 21 June 2012 at 15:57 Elmer van Chastelet commented:

Fixed in r5177


On 21 June 2012 at 15:57 Elmer van Chastelet closed this issue.

Log in to post comments