[Webfunds-commits] java/webfunds/client/contracts ChangeContractStore.java

Jeroen C. van Gelderen gelderen@cypherpunks.ai
Sat, 17 Feb 2001 16:36:37 -0400 (AST)


gelderen    01/02/17 16:36:37

  Modified:    webfunds/client/contracts ChangeContractStore.java
  Log:
  Dumb down toString() implementation to avoid null ptr dereference when
  the ChangeContractStore doesn't have a 'Core'. This happens when the
  store is used in Pumphouse.

Revision  Changes    Path
1.4       +3 -4      java/webfunds/client/contracts/ChangeContractStore.java

Index: ChangeContractStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/contracts/ChangeContractStore.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ChangeContractStore.java	2000/03/25 20:19:21	1.3
+++ ChangeContractStore.java	2001/02/17 20:36:37	1.4
@@ -1,5 +1,5 @@
 /*
- * $Id: ChangeContractStore.java,v 1.3 2000/03/25 20:19:21 iang Exp $
+ * $Id: ChangeContractStore.java,v 1.4 2001/02/17 20:36:37 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -44,6 +44,7 @@
     public void setCore(Core core)
     {
         //can never change core
+        // XXX: then why does this method exist and why does it fail silently?! -JCvG
         if (c == null)
             c = core;
     }
@@ -81,9 +82,7 @@
 
     public String toString()
     {
-        String s = "ChangeContractStore: " +
-                   "\n\t\tUInterface = " + c.getUInterface(this) +
-                   super.toString();
+        String s = "ChangeContractStore: " + super.toString();
         return s;
     }
 }