From: aclement Date: Thu, 29 May 2008 19:02:12 +0000 (+0000) Subject: prevent runaway memory usage X-Git-Tag: V1_6_1rc1~213 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7852ac4696e6f505d1486dc6da5691a151938090;p=aspectj.git prevent runaway memory usage --- diff --git a/weaver/src/org/aspectj/weaver/World.java b/weaver/src/org/aspectj/weaver/World.java index 493aec9a0..75ae09ac8 100644 --- a/weaver/src/org/aspectj/weaver/World.java +++ b/weaver/src/org/aspectj/weaver/World.java @@ -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); }