]> source.dussan.org Git - aspectj.git/commitdiff
fix for http://jira.springframework.org/browse/SPR-4512
authoraclement <aclement>
Thu, 28 Feb 2008 21:09:20 +0000 (21:09 +0000)
committeraclement <aclement>
Thu, 28 Feb 2008 21:09:20 +0000 (21:09 +0000)
aspectj5rt/java5-src/org/aspectj/lang/reflect/AjTypeSystem.java

index 93ba5cc6f17142e3b71d1a7bc6003d3c128bad98..5ac17e26fff63e5dc9e4637a2b9b06e32c6ae608 100644 (file)
@@ -34,8 +34,8 @@ public class AjTypeSystem {
                 * AspectJ-awareness on top.
                 */
                public static <T> AjType<T> getAjType(Class<T> fromClass) {
-                       if (ajTypes.containsKey(fromClass)) {
-                               WeakReference<AjType> weakRefToAjType =  ajTypes.get(fromClass);
+                       WeakReference<AjType> weakRefToAjType =  ajTypes.get(fromClass);
+                       if (weakRefToAjType!=null) {
                                AjType<T> theAjType = weakRefToAjType.get();
                                if (theAjType != null) {
                                        return theAjType;