rishabhdaim commented on code in PR #1422: URL: https://github.com/apache/jackrabbit-oak/pull/1422#discussion_r1567244664
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java: ########## @@ -1216,34 +1220,27 @@ private boolean isDeletedOrOrphanedNode(final NodeState traversedState, phases.stop(GCPhase.DETAILED_GC_COLLECT_ORPHAN_NODES); return false; } - if (detailedGcMode == DetailedGCMode.GAP_ORPHANS - || detailedGcMode == DetailedGCMode.GAP_ORPHANS_EMPTYPROPS) { + if (detailedGcMode == DetailedGCMode.GAP_ORPHANS || detailedGcMode == DetailedGCMode.GAP_ORPHANS_EMPTYPROPS) { // check the ancestor docs for gaps final Path docPath = doc.getPath(); - final Path geaPath = greatestExistingAncestorOrSelf; - final Path geaChildPath = docPath - .getAncestor(docPath.getDepth() - geaPath.getDepth() - 1); + final Path geaChildPath = docPath.getAncestor(docPath.getDepth() - greatestExistingAncestorOrSelf.getDepth() - 1); Boolean missingType = missingDocsTypes.get(geaChildPath); if (missingType == null) { // we don't have it cached yet - so do the potentially expensive find - final NodeDocument d = nodeStore.getDocumentStore().find(NODES, - Utils.getIdFromPath(geaChildPath)); - final boolean parentDocExists = d != null; - missingType = !parentDocExists; Review Comment: removed the inline variables as suggested by intelliJ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org