Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11311 Improve org-apache-sling-jcr-resource
  3. SLING-11367

Potential NPE as ResolveContext.getProviderState() is nullable

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • JCR Resource 3.2.0
    • JCR Resource 3.2.2
    • JCR
    • None

    Description

      since ResolveContext.getProviderState() is defined to return a nullable provider state code analysis spots this a potential source for NPE. according to cziegeler this should never return null as long as the provider is active.

      i would suggest to move access to session, resourcefactory and helperdata to a utility with comments on why the NPE should not occur.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h