Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
AbstractSharedCachingDataStore is prone to NPE as it requires a successful completion of the init-method in order to have fields populated. the API contract is not clear but that's what i concluded from the code.
instead of having the code fail with NPE if the init was not successful (or missing altogether), i would recommend to verify that that datastore is actually properly initialized and throw an IllegalStateException instead.
Maybe it would also be good to make the API contract a bit more explicit. the Javadoc of DataStore is quite minimalistic