Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3340

Entity import definition loses the static modifier when a field is added

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Complete
    • None
    • 1.2.4.RELEASE
    • @ CORE
    • None

    Description

      If a entity (or any .java) is modified by Spring Roo and this file has an import static definition, the static modifier is lost when file is rewritten.

      To test it:

      1. create a new project using _clinic.roo: scrip
      2. Edit Vet.java and add this import declaration:
        import static org.apache.commons.lang3.Validate.notBlank;
        
      3. Use Roo field command to add a field to entity:
        field string --fieldName foo --class ~.domain.Vet
        
      4. After Roo changes Vet.java, the previous import declaration will be this:
        import org.apache.commons.lang3.Validate.notBlank;
        

      Attachments

        Activity

          People

            stewarta Alan Stewart
            jmvivo Jose Manuel Vivó ( Chema ) - DISID.
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: