[Webfunds-commits] java/webfunds/client AccountBrowserImpl.java Core.java

Ian Grigg iang@cypherpunks.ai
Mon, 18 Sep 2000 13:02:27 -0400 (AST)


iang        00/09/18 13:02:26

  Modified:    webfunds/client AccountBrowserImpl.java Core.java
  Log:
  Oops, some how these got out of sync and the toString spat the dummy on NPE.
  It is not clear why wallets[] is being passed to AccountTreeModel if it is
  never updated....

Revision  Changes    Path
1.75      +12 -8     java/webfunds/client/AccountBrowserImpl.java

Index: AccountBrowserImpl.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/AccountBrowserImpl.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- AccountBrowserImpl.java	2000/09/17 20:35:55	1.74
+++ AccountBrowserImpl.java	2000/09/18 17:02:26	1.75
@@ -1,5 +1,5 @@
 /*
- * $Id: AccountBrowserImpl.java,v 1.74 2000/09/17 20:35:55 iang Exp $
+ * $Id: AccountBrowserImpl.java,v 1.75 2000/09/18 17:02:26 iang Exp $
  *
  * Copyright (c) Systemics Inc 1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -73,6 +73,8 @@
     {
         debug(bug, "  AB: ");
         init = true;
+        wallets = new WalletInterface[0];    // for consistency
+        plugins = new PluginInfo[0];
 
         logmsg("windows");
         frame = new JFrame(me);
@@ -1211,7 +1213,8 @@
     }
 
     //
-    //  Yes, but when is wallets ever read?  In AccountTreeModel.
+    //  Yes, but when is wallets ever read?  In AccountTreeModel?
+    //  Is it ever reset?
     //  And, what happens if it is re-called?  Must take care not
     //  to leave old wallets in old array hanging around.
     //
@@ -1219,7 +1222,7 @@
     {
         this.wallets = wallets;
         logmsg("wallets now set: " + wallets.length);
-        //set AccountTreeModel
+        //set in AccountTreeModel !?!
     }
 
     public void treeClicked(MouseEvent evt)
@@ -1348,12 +1351,13 @@
 
     public String toString()
     {
-        String retval = "AccountBrowserImpl: " +
-                        "\n\tWallets = " + wallets.length +
-                        //"\n\tPlugins = " + plugins.length +
-                        "";
+        String s = "";
 
-        return retval;
+        s += "AccountBrowserImpl: ";
+        s += "\n\tWallets = " + wallets.length;
+        s += "\n\tPlugins = " + plugins.length;
+
+        return s;
     }
 
     public static void main(String[] args)



1.64      +9 -8      java/webfunds/client/Core.java

Index: Core.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/Core.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- Core.java	2000/09/17 21:02:19	1.63
+++ Core.java	2000/09/18 17:02:26	1.64
@@ -1,4 +1,4 @@
-/* $Id: Core.java,v 1.63 2000/09/17 21:02:19 iang Exp $
+/* $Id: Core.java,v 1.64 2000/09/18 17:02:26 iang Exp $
  *
  * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * The WebFunds Development Team.  All rights reserved.
@@ -186,19 +186,20 @@
         // set rest of CoreParts.
         // Somewhere here, it freezes.
         //
-        logmsg("CoreParts: multi ");
+        logmsg("CoreParts: ");
+        logmsg(" CP: multi ");
         setStore(v2); // multistore);
-        logmsg("address ");
+        logmsg(" CP: address ");
         setAddressbook(new Addressbook());
-        logmsg("browser ");
+        logmsg(" CP: browser ");
         AccountBrowserImpl ab1 = new AccountBrowserImpl(bug);
-        logmsg("    ab1: " + ab1);
+        logmsg(" CP:     ab1: " + ab1);
         setAccountBrowser(ab1);
-        logmsg("wallets ");
+        logmsg(" CP: wallets ");
         setWalletManager(new WalletManager(bug));
-        logmsg("plugins ");
+        logmsg(" CP: plugins ");
         setPluginManager(new PluginManager(bug));
-        logmsg("set.");
+        logmsg(" CP: set.");
 
 
         //