mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-13 18:55:52 +00:00
Add readObject method to initialise listeners object which would be null in case the confidence object gets created from Serialisation
This commit is contained in:
parent
b28204b6ca
commit
b74d1e32a2
@ -140,6 +140,14 @@ public class TransactionConfidence implements Serializable {
|
|||||||
this.hash = hash;
|
this.hash = hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In case the class gets created from a serialised version, we need to recreate the listeners object as it is set as transient and only created in the constructor.
|
||||||
|
*/
|
||||||
|
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
|
in.defaultReadObject();
|
||||||
|
listeners = new CopyOnWriteArrayList<ListenerRegistration<Listener>>();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A confidence listener is informed when the level of {@link TransactionConfidence} is updated by something, like
|
* <p>A confidence listener is informed when the level of {@link TransactionConfidence} is updated by something, like
|
||||||
* for example a {@link Wallet}. You can add listeners to update your user interface or manage your order tracking
|
* for example a {@link Wallet}. You can add listeners to update your user interface or manage your order tracking
|
||||||
|
Loading…
x
Reference in New Issue
Block a user