Issue Details (XML | Word | Printable)

Key: GROOVY-2167
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: Graeme Rocher
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

Occasional NPE with multiple threads with class caching mechanism

Created: 05/Oct/07 05:51 AM   Updated: 06/Oct/07 06:41 AM   Resolved: 06/Oct/07 06:41 AM
Return to search
Component/s: None
Affects Version/s: 1.1-beta-3
Fix Version/s: 1.1-rc-1

Time Tracking:
Not Specified


 Description  « Hide

Error is:

java.lang.NullPointerException
       at org.codehaus.groovy.runtime.MetaClassHelper.isValidMethod(MetaClassHelper.java:678)
       at org.codehaus.groovy.runtime.MetaClassHelper.isValidMethod(MetaClassHelper.java:708)
       at groovy.lang.MetaClassImpl.chooseMethod(MetaClassImpl.java:2146)
       at groovy.lang.MetaClassImpl.getMethodWithoutCaching(MetaClassImpl.java:857)
       at groovy.lang.MetaClassImpl.getMethodWithCaching(MetaClassImpl.java:803)
       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:623)
       at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:936)
       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:602)
       at groovy.lang.Closure.call(Closure.java:293)
       at org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod.invoke(ClosureMetaMethod.java:78)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.codehaus.groovy.reflection.CachedMethod.invokeByReflection(CachedMethod.java:107)

its basically the paramTypes object is null

CachedClass[] paramTypes = pt.getParameterTypes();
       if ((size >= paramTypes.length || size == paramTypes.length - 1)
pt.getParameterTypes returns null

boom NPE



Guillaume Laforge added a comment - 06/Oct/07 06:41 AM

Fixed by Alex.
Don't you have a JIRA account, so that we can assign issues to you?


Guillaume Laforge made changes - 06/Oct/07 06:41 AM
Field Original Value New Value
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]