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

NPE in ServicingSearchIndex#updateNodes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • 4.1.2
    • 5.0.0
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: