Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Hideapp.grails.version=1.3.4
app.servlet.version=2.4
plugins.build-test-data=1.1.1
plugins.code-coverage=1.1.7
plugins.datasources=0.5
plugins.grails-melody=0.6
plugins.hibernate=1.3.4
plugins.jquery=1.4.1.1
plugins.reloadable-config=0.1
plugins.rest=0.3
plugins.tomcat=1.3.4
JDK 1.6.0_22
Ubuntu 10.10Showapp.grails.version=1.3.4 app.servlet.version=2.4 plugins.build-test-data=1.1.1 plugins.code-coverage=1.1.7 plugins.datasources=0.5 plugins.grails-melody=0.6 plugins.hibernate=1.3.4 plugins.jquery=1.4.1.1 plugins.reloadable-config=0.1 plugins.rest=0.3 plugins.tomcat=1.3.4 JDK 1.6.0_22 Ubuntu 10.10
Description
I noticed this in my integration tests today.
My setup is as follows:
class TicketController {
def read {
ticketService.read(params.id as int)
}
}
Passing in that value in the argument to the method will cause a java.lang.IllegalArgumentException: argument type mismatch
Changing that to :
class TicketController {
def read {
def id = params.id as int
ticketService.read(id)
}
}
Exception looks something like this :
java.lang.IllegalArgumentException: argument type mismatch
at GrailsMelodyGrailsPlugin$_closure5_closure18_closure19.doCall(GrailsMelodyGrailsPlugin.groovy:156)
at ....helpdesk.TicketController$_closure12.doCall(TicketController.groovy:192)
at ....helpdesk.TicketController$_closure12.doCall(TicketController.groovy)
at ....helpdesk.TicketControllerTests.testGetRemediatedAffectedAssets(TicketControllerTests.groovy:354)
I meant to state that changing the code to the 2nd example resolves the exception. Did not mean to imply that also does not work.