Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9402

AbstractSharedCachingDataStore is prone to NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • blob-plugins
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            angela Angela Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: