Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2319

Support calls to redirect() when calculating the types of Controller action return values

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0.RELEASE
    • Fix Version/s: 3.2.0.M2
    • Component/s: GRAILS
    • Labels:

      Description

      STS is not properly inferring the types of controller action return values when there is a redirect. Consider this controller class:

      class MyController {
        def save() {
          redirect(action: "show")
        }
        def show() {
          [myInstance: new My()]
        }
      }
      

      When referring to save inside of a unit or integration test (or elsewhere, actually), we should know that myInstance is a valid field on it. Like this:

      def saveAction = myController.save()
      saveAction.myInstance // should have inferred type of My
      

        Activity

        Hide
        Andrew Eisenberg (c) added a comment -

        Won't get to this for M2 release. Pushing to RC1.

        Show
        Andrew Eisenberg (c) added a comment - Won't get to this for M2 release. Pushing to RC1.
        Andrew Eisenberg (c) made changes -
        Field Original Value New Value
        Fix Version/s 2.9.0.RC1 [ 11802 ]
        Fix Version/s 2.9.0.M2 [ 11800 ]
        Hide
        Andrew Eisenberg (c) added a comment -

        Won't get to this for RC1.

        Show
        Andrew Eisenberg (c) added a comment - Won't get to this for RC1.
        Andrew Eisenberg (c) made changes -
        Fix Version/s 2.9.0.RC2 [ 11803 ]
        Fix Version/s 2.9.0.RC1 [ 11802 ]
        Hide
        Andrew Eisenberg (c) added a comment -

        This bug really bothers me. Fix for 3.2.0 release.

        Show
        Andrew Eisenberg (c) added a comment - This bug really bothers me. Fix for 3.2.0 release.
        Andrew Eisenberg (c) made changes -
        Fix Version/s 3.2.0.RELEASE [ 12886 ]
        Fix Version/s 2.9.0.RC2 [ 11803 ]
        Priority Minor [ 9 ] Major [ 6 ]
        Hide
        Andrew Eisenberg (c) added a comment -

        Fixed. Finally.

        Show
        Andrew Eisenberg (c) added a comment - Fixed. Finally.
        Andrew Eisenberg (c) made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.2.0.M2 [ 12884 ]
        Fix Version/s 3.2.0.RELEASE [ 12886 ]
        Resolution Fixed [ 8 ]
        Trevor Marshall (c) made changes -
        Workflow jira [ 39099 ] jira with Pivotal Tracker [ 66915 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        399d 4h 57m 1 Andrew Eisenberg (c) 08/Jan/13 3:59 PM

          People

          • Assignee:
            Andrew Eisenberg (c)
            Reporter:
            Andrew Eisenberg (c)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: