[Webfunds-commits] java/webfunds/client Transaction.java
Jeroen C. van Gelderen
gelderen@cypherpunks.ai
Tue, 13 Mar 2001 19:50:18 -0400 (AST)
gelderen 01/03/13 19:50:18
Modified: webfunds/client Transaction.java
Log:
Transactions may have a description of null to indicate absence of a
description. Fix the constructor checks to accept this. This should make
the history work again.
Revision Changes Path
1.14 +11 -6 java/webfunds/client/Transaction.java
Index: Transaction.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/Transaction.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Transaction.java 2001/03/07 03:10:39 1.13
+++ Transaction.java 2001/03/13 23:50:17 1.14
@@ -1,5 +1,5 @@
/*
- * $Id: Transaction.java,v 1.13 2001/03/07 03:10:39 gelderen Exp $
+ * $Id: Transaction.java,v 1.14 2001/03/13 23:50:17 gelderen Exp $
*
* Copyright (c) Systemics Ltd 1995-2001 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -11,7 +11,10 @@
/**
- * @version $Revision: 1.13 $
+ * WebFunds' idea of a transaction. Transactions from other payment systems
+ * such as SOX are mapped to instances of this class.
+ *
+ * @version $Revision: 1.14 $
*/
public final class Transaction {
@@ -61,9 +64,6 @@
if( contract == null )
throw new IllegalArgumentException("contract: " + contract);
- if( desc == null )
- throw new IllegalArgumentException("desc: " + desc);
-
if( date == null )
throw new IllegalArgumentException("date: " + date);
@@ -72,10 +72,11 @@
this.source = (source == null ? new AccountInfo() : source);
this.target = (target == null ? new AccountInfo() : target);
+ this.desc = (desc == null) ? null : (byte[])desc.clone();
+
this.transid = transid;
this.contract = contract;
this.amount = amount;
- this.desc = (byte[])desc.clone();
this.date = date;
this.status = STATUS_PENDING;
@@ -167,6 +168,10 @@
return date;
}
+
+ /**
+ * Return a description or null.
+ */
public byte[] getDesc() {
return desc;
}