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.

        Issue Links

          Activity

          Hide
          stewarta Alan Stewart added a comment -

          Please attach a project or Roo script

          Show
          stewarta Alan Stewart added a comment - Please attach a project or Roo script
          Hide
          stewarta Alan Stewart added a comment -

          Appears to be a regression bug. Resolved in Git ID 630d42785148538551073ad3f27706d84a0d4d55

          Show
          stewarta Alan Stewart added a comment - Appears to be a regression bug. Resolved in Git ID 630d42785148538551073ad3f27706d84a0d4d55
          Hide
          stewarta Alan Stewart added a comment -

          Not a regression bug after all but some untested refactoring in the addon-web-mvc-controller. A further change was made in Git ID 55ce9284bffb62c054a66d2da28163f42c98b1ab

          Show
          stewarta Alan Stewart added a comment - Not a regression bug after all but some untested refactoring in the addon-web-mvc-controller. A further change was made in Git ID 55ce9284bffb62c054a66d2da28163f42c98b1ab
          Hide
          stewarta Alan Stewart added a comment -

          Will search correct memberDetails object instead of just governor

          Show
          stewarta Alan Stewart added a comment - Will search correct memberDetails object instead of just governor
          Hide
          stewarta Alan Stewart added a comment -

          The main issue was that methods were being searched for in the form backing object's MemberDetails instead of the controller's MemberDetails.
          Resolved in Git ID e307348ae3cc13c5390a528a3730132c990c753d

          Show
          stewarta Alan Stewart added a comment - The main issue was that methods were being searched for in the form backing object's MemberDetails instead of the controller's MemberDetails. Resolved in Git ID e307348ae3cc13c5390a528a3730132c990c753d

            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: