]> source.dussan.org Git - aspectj.git/commitdiff
Bug 155033 "Use ajcore for LTW problems" (OOM errors running AJDT AllCoreTests)
authormwebster <mwebster>
Tue, 7 Nov 2006 16:49:45 +0000 (16:49 +0000)
committermwebster <mwebster>
Tue, 7 Nov 2006 16:49:45 +0000 (16:49 +0000)
weaver/src/org/aspectj/weaver/Dump.java

index de4daea2650f2f559db17b7c197a50a378c67a26..bdc6ec46346ed279bdcdeb836fe89f1fd42e8c1d 100644 (file)
@@ -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);