Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.1.1Release
-
Fix Version/s: 2.1.2Release
-
Component/s: Refactoring
-
Labels:None
-
Number of attachments :
Description
I have this controller:
def list = {
params.max = Math.min(params.max ? params.int('max') : 10, 100)
Thread.sleep(2000)
[albumInstanceList: Album.list(params), albumInstanceTotal: Album.count()]
}
I select the whole section 'Thread.sleep(2000)' and then refactor extract method to a method called 'delay', the code becomes this:
def list = {
params.max = Math.min(params.max ? params.int('max') : 10, 100)
params = delay()
[albumInstanceList: Album.list(params), albumInstanceTotal: Album.count()]
}
private Map delay() {
Thread.sleep(2000)
return params
}
I wasn't expecting a return value in the method signature and return value at the end of the method.
Fixed along with the changes for
GRECLIPSE-984.