Angela Schreiber created OAK-9402:
-------------------------------------
Summary: AbstractSharedCachingDataStore is prone to NPE
Key: OAK-9402
URL: https://issues.apache.org/jira/browse/OAK-9402
Project: Jackrabbit Oak
Issue Type: Bug
Components: blob-plugins
Reporter: Angela Schreiber
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 ;)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)