]> source.dussan.org Git - aspectj.git/commitdiff
prevent runaway memory usage
authoraclement <aclement>
Thu, 29 May 2008 19:02:12 +0000 (19:02 +0000)
committeraclement <aclement>
Thu, 29 May 2008 19:02:12 +0000 (19:02 +0000)
weaver/src/org/aspectj/weaver/World.java

index 493aec9a0c483da444d7a0660fc1b6ae8afdd122..75ae09ac853fb51c56de65e70e28c47bd0cfc39f 100644 (file)
@@ -317,7 +317,9 @@ public abstract class World implements Dump.INode {
                if (dumpState_cantFindTypeExceptions==null) {
                  dumpState_cantFindTypeExceptions = new ArrayList();   
                }
-               dumpState_cantFindTypeExceptions.add(new RuntimeException("Can't find type "+ty.getName()));
+               if (dumpState_cantFindTypeExceptions.size() < 100) { // limit growth
+            dumpState_cantFindTypeExceptions.add(new RuntimeException("Can't find type " + ty.getName()));
+        }
                return new MissingResolvedTypeWithKnownSignature(ty.getSignature(),this);
        }