From a56894211c4c4f8565938d729db34de7ccb563dd Mon Sep 17 00:00:00 2001 From: mwebster Date: Tue, 7 Nov 2006 16:49:45 +0000 Subject: [PATCH] Bug 155033 "Use ajcore for LTW problems" (OOM errors running AJDT AllCoreTests) --- weaver/src/org/aspectj/weaver/Dump.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/Dump.java b/weaver/src/org/aspectj/weaver/Dump.java index de4daea26..bdc6ec463 100644 --- a/weaver/src/org/aspectj/weaver/Dump.java +++ b/weaver/src/org/aspectj/weaver/Dump.java @@ -14,6 +14,7 @@ package org.aspectj.weaver; import java.io.File; import java.io.FileOutputStream; import java.io.PrintStream; +import java.lang.ref.WeakReference; import java.net.URL; import java.text.SimpleDateFormat; import java.util.Date; @@ -243,7 +244,7 @@ public class Dump { public static void registerNode (Class module, INode newNode) { if (trace.isTraceEnabled()) trace.enter("registerNode",null,new Object[] { module, newNode} ); - nodes.put(newNode,newNode); + nodes.put(newNode,new WeakReference(newNode)); if (trace.isTraceEnabled()) trace.exit("registerNode",nodes.size()); } @@ -298,7 +299,8 @@ public class Dump { Set keys = nodes.keySet(); for (Iterator i = keys.iterator(); i.hasNext();) { Object module = i.next(); - INode dumpNode = (INode)nodes.get(module); +// INode dumpNode = (INode)nodes.get(module); + INode dumpNode = (INode)module; println("---- " + formatObj(dumpNode) + " ----"); try { dumpNode.accept(dumpVisitor); -- 2.39.5