Author: toad
Date: 2009-03-17 15:19:42 +0000 (Tue, 17 Mar 2009)
New Revision: 26064

Modified:
   branches/db4o/freenet/src/freenet/node/Node.java
Log:
Minor improvements to object dumping


Modified: branches/db4o/freenet/src/freenet/node/Node.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/Node.java    2009-03-17 15:18:43 UTC 
(rev 26063)
+++ branches/db4o/freenet/src/freenet/node/Node.java    2009-03-17 15:19:42 UTC 
(rev 26064)
@@ -914,7 +914,9 @@
                System.err.println("DUMPING DATABASE CONTENTS:");
                ObjectSet<Object> contents = db.queryByExample(new Object());
                Map<String,Integer> map = new HashMap<String, Integer>();
-               for(Object o : contents) {
+               Iterator i = contents.iterator();
+               while(i.hasNext()) {
+                       Object o = i.next();
                        String name = o.getClass().getName();
                        if((map.get(name)) != null) {
                                map.put(name, map.get(name)+1);
@@ -925,7 +927,7 @@
                        try {
                                Logger.minor(this, "DATABASE: 
"+o.getClass()+":"+o+":"+db.ext().getID(o));
                        } catch (Throwable t) {
-                               Logger.minor(this, "CAUGHT "+t);
+                               Logger.minor(this, "CAUGHT "+t+" FOR CLASS 
"+o.getClass());
                        }
                }
                int total = 0;

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to