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

Overriding method results in Method '*' already defined in target type

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1.3.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: @ CORE, WEB MVC
    • Labels:
      None
    • Environment:
      Intel Mac 10.6.7

      Description

      I had a working project running 1.1.2. I upgraded to 1.1.3 and the following issues began. I have not found a work-around but wonder if there is a technique for overriding methods that I should be using and am not.

      In my AthleteController I have the following:

      Code:

      @RequestMapping(value = "/

      {id}

      ", method = RequestMethod.GET)
      public String show(@PathVariable("id") Long id, Model uiModel)

      { AthleteController.addBirthdayDateTimeFormatPatterns(uiModel); uiModel.addAttribute("athlete", Athlete.findAthlete(id)); uiModel.addAttribute("itemId", id); return "athletes/show"; }

      and in my roo shell it instantly complains:

      Code:

      Method 'show' already defined in target type 'com.blah.controllers.AthleteController' (ITD target 'com.blah.controllers.AthleteController_Roo_Controller')

      For basically every method that I have overridden in my controllers it complains. (As I fix one, the next one comes up complaining in the shell.) Renaming the method name does stop the complaining,but Roo then also re-gen's the method in the Roo class.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                lsutton Lorin Sutton
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: