Fail if no keypair is set

pull/17/merge
Richard Körber 2015-12-13 14:42:02 +01:00
parent 535543e7b1
commit 1267684614
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ public class Account {
* {@link KeyPair} that identifies the account. * {@link KeyPair} that identifies the account.
*/ */
public Account(KeyPair keyPair) { public Account(KeyPair keyPair) {
if (keyPair == null) {
throw new NullPointerException("keypair must be set");
}
this.keyPair = keyPair; this.keyPair = keyPair;
} }