1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 20:42:06 +01:00

CachingOmemoStore: check for nullity of wrapped store

This commit is contained in:
Paul Schaub 2018-01-09 15:27:49 +01:00
parent f3403571a7
commit 28cabf00ee
2 changed files with 4 additions and 1 deletions

View file

@ -45,7 +45,7 @@ public class SignalCachingOmemoStore extends CachingOmemoStore<IdentityKeyPair,
/** /**
* Create a new SignalCachingOmemoStore as a caching layer around a persisting OmemoStore * Create a new SignalCachingOmemoStore as a caching layer around a persisting OmemoStore
* (eg. a SignalFileBasedOmemoStore). * (eg. a SignalFileBasedOmemoStore).
* @param wrappedStore * @param wrappedStore other store implementation that gets wrapped
*/ */
public SignalCachingOmemoStore(OmemoStore<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord, public SignalCachingOmemoStore(OmemoStore<IdentityKeyPair, IdentityKey, PreKeyRecord, SignedPreKeyRecord,
SessionRecord, SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> wrappedStore) SessionRecord, SignalProtocolAddress, ECPublicKey, PreKeyBundle, SessionCipher> wrappedStore)

View file

@ -63,6 +63,9 @@ public class CachingOmemoStore<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Se
} }
public CachingOmemoStore(OmemoStore<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_Addr, T_ECPub, T_Bundle, T_Ciph> wrappedStore) { public CachingOmemoStore(OmemoStore<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_Addr, T_ECPub, T_Bundle, T_Ciph> wrappedStore) {
if (wrappedStore == null) {
throw new NullPointerException("Wrapped OmemoStore MUST NOT be null!");
}
this.keyUtil = null; this.keyUtil = null;
persistent = wrappedStore; persistent = wrappedStore;
} }