Details
Description
GrailsMock was changed with GRAILS-7448 from getting the types of parameters on mocked methods from parameter.getClass() to parameter.class. This was done to fix cases where the instance of a parameter passed in was itself a GrailsMock and resulted in undemanded methods being called. However, this caused a regression with classes that implement getProperty() in their metaClass and override the behavior such that it.class != it.getClass().
I was attempting to make a change and a test and submit a pull request, but I cannot immediately determine how to go about this. The mocked class will look and act like the class being mocked (e.g. new GrailsMock(String).createMock() instanceof String == true) so I don't know how to vary the behavior to fix the regression and allow GrailsMock's to also be parameters to other demanded methods.
Any thoughts?
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
| Field | Original Value | New Value |
|---|---|---|
| Resolution | Fixed [ 1 ] | |
| Fix Version/s | 2.1 [ 12801 ] | |
| Fix Version/s | 2.0.2 [ 13064 ] | |
| Assignee | Graeme Rocher [ graemerocher ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |