[aspectwerkz-dev] [jira] Deleted: (AW-145) Encountering NullPointerExceptions with Java 1.3.1
| Newsgroups | gmane.comp.java.aspectwerkz.devel |
|---|---|
| Message-ID | <[email protected]> |
[ http://jira.codehaus.org/browse/AW-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
[email protected] deleted AW-145:
---------------------------------
> Encountering NullPointerExceptions with Java 1.3.1
> --------------------------------------------------
>
> Key: AW-145
> URL: http://jira.codehaus.org/browse/AW-145
> Project: AspectWerkz
> Issue Type: Bug
> Environment: Redhat 7.3
> Java: 1.3.1_09
> Reporter: Chris Hunt
> Assignee: Alexandre Vasseur
>
> Getting a NullPointerException at: org.codehaus.aspectwerkz.joinpoint.control.DefaultJoinPointController.proceed(DefaultJoinPointController.java:50)
> and at:
> org.codehaus.aspectwerkz.joinpoint.MemberMethodJoinPoint.<init>(MemberMethodJoinPoint.java:90)
> I will attach a small sample test that consistently reproduces this problem. I did some initial investigation and have come up with the following:
> - It appears that the keys in the WeakHashMap objects used to store the pointcut cache in org.codehaus.aspectwerkz.xmldef.XmlDefSystem are getting removed by the VM in between calls to map.containsKey() and map.get(). The containsKey() returns true, the keys are removed by the VM and the corresponding call to get() returns null.
> - This causes null objects to be returned from XmlDefSystem.getExecutionPointcuts() and XmlDefSystem.getCFlowExpressions(). The clients that call these methods assume that the objects returned will always be non-null.
> - This problem doesn't occur when using the 1.4 jdk; perhaps there have been changes in how the VM handles WeakReferences and WeakHasMaps. Unfortunately, using 1.4 is not an option at this time.
> - I made a quick change from WeakHashMaps to HashMaps to prove this was the issue; the test then executed without error.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email