From aad2fbcabaf04a52aac80e974febd517958db007 Mon Sep 17 00:00:00 2001 From: Neil McErlean Date: Mon, 29 Sep 2014 11:20:26 +0000 Subject: [PATCH] Fix for ACE-2952. Slight refactor to safely use Long.equals instead of Long == Long. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85895 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/repo/solr/SOLRTrackingComponentImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java b/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java index 8cd7220ce0..34dba1416f 100644 --- a/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java +++ b/source/java/org/alfresco/repo/solr/SOLRTrackingComponentImpl.java @@ -642,7 +642,9 @@ public class SOLRTrackingComponentImpl implements SOLRTrackingComponent } }); } - if (nodeId == lastCached && !toVisit.isEmpty()) + final boolean nodeIdEqualsLastCached = (nodeId == null && lastCached == null) || + nodeId.equals(lastCached); + if (nodeIdEqualsLastCached && !toVisit.isEmpty()) { nodeDAO.cacheNodesById(toVisit); lastCached = toVisit.peekLast();