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

Accessors for boolean properties are not generated properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.6
    • 1.6.6, 1.7-rc-1
    • class generator
    • None
    • Suse/Vista, Java6, Eclipse

    Description

      see original post here: http://www.nabble.com/POGO-properties-redefined-in-G1.0.3-tt17751775.html

      In a class like:

      import org.springframework.security.userdetails.UserDetails

      class UserAccount implements UserDetails {

      String username

      String password

      boolean accountNonExpired = true

      boolean accountNonLocked = true

      boolean credentialsNonExpired = true

      /* other stuff */

      }

      I'm getting a compile error:

      .grails\1.0.3\projects\wextent\generated-java-source\UserAccount.java:10: UserAccount is not abstract and does not override abstract method isCredentialsNonExpired() in org.springframework.security.userdetails.UserDetails
      public class UserAccount

      I assume that instead of isCredentialsNonExpired() for the property credentialsNonExpired the getCredentialsNonExpired() is generated.

      As a hacky work-around I replaced the groovy-all-1.5.6.jar with the groovy-all-1.5.4.jar, but the issue shall be fixed officially, so that the improvements in groovy 1.5.6 are accessible in Grails 1.0.3

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              smirnovk Konstantyn Smirnov
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: