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

Bad entity changes after 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 some erroneous changes is made:

      • Bad asterisk imports: "import java.utils.*;" becomes "import java.*;"
      • Lose of Array fields: "String[] strings;" becomes "String strings;"
      • Lose of Array constructor parameters: "Vet(String[] strings)" becomes "Vet(String strings)"

      To test it:

      1. create a new project using clinic.roo script.
      2. replace Vet.java with attached Vet.java.changed file
      3. Use Roo field command to add a field to entity:
        field string --fieldName foo --class ~.domain.Vet
        
      4. When process finish Vet.java looks like Vet.java.error

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: