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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.2.4.RELEASE
    • Component/s: @ CORE
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: