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

ItdTypeDetailsBuilder requires abstract methods to have a body

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.4.RELEASE
    • Fix Version/s: 1.1.5.RELEASE
    • Component/s: None
    • Labels:
      None

      Description

      o.s.r.classpath.details.ItdTypeDetailsBuilder.onAddMethod(MethodMetadataBuilder) requires the passed-in method builder to specify a method body, which is incorrect for abstract methods (e.g. those being introduced into an interface).

      This bug only affects developers of addons that generate an ITD that introduces an abstract method.

      The workaround is to add a dummy body as follows:

      MethodMetadataBuilder methodBuilder = ... // obtain or create as normal (for an abstract method)
      methodBuilder.getBodyBuilder().appendFormalLine("anything"); // this line will not appear in the generated ITD, as the method is abstract

        Attachments

          Activity

            People

            Assignee:
            aswan Andrew Swan
            Reporter:
            aswan Andrew Swan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.25d
                0.25d
                Remaining:
                Remaining Estimate - 0.25d
                0.25d
                Logged:
                Time Spent - Not Specified
                Not Specified