Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1695

NPE in ServicingSearchIndex#updateNodes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 5.0.0
    • Component/s: None
    • Similar issues:

      Description

      A client has reported NullPointerExceptions in the logs, coming from org.hippoecm.repository.query.lucene.ServicingSearchIndex#updateNodes (ServicingSearchIndex.java:415)

      411: final Map<NodeId, NodeState> augmentedAdd = new HashMap<>();
      412: while (add.hasNext()) {
      413:    final NodeState nodeState = add.next();
      414:    // since NodeState does not have hashcode/equals impls, we need to use NodeId for equals in Map
      415:    augmentedAdd.put(nodeState.getNodeId(), nodeState);
      416: }
      

      Since nodeState = null on ine 415, this seems a problem where after an iterator .next() call, its result is not checked for null, while the iterator can return null (see in the SearchManager from Hippo-patched JackRabbit).

      Before the rewrite of that method in REPO-1426, null checks were in place.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jhoffman Jeroen Hoffman
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: