Skip to content

MLE-29898 MLE-29899: [develop-11.3] fix ResourceSequence leak in ContentOutputFormat initialize() and null pointer dereference in NodeImpl.isEqualNode() (Backport)#607

Merged
vshaniga merged 1 commit into
develop-11.3from
MLE-29898-MLE-29899-polaris-fix-11.3
May 28, 2026
Merged

MLE-29898 MLE-29899: [develop-11.3] fix ResourceSequence leak in ContentOutputFormat initialize() and null pointer dereference in NodeImpl.isEqualNode() (Backport)#607
vshaniga merged 1 commit into
develop-11.3from
MLE-29898-MLE-29899-polaris-fix-11.3

Conversation

@vshaniga
Copy link
Copy Markdown
Collaborator

These changes have already been validated on the develop branch in the PR: #605

Tests

  • Ran unit tests → All passed
  • Ran 06mlcp test suite → No regression failures were found

….initialize() and null pointer dereference in NodeImpl.isEqualNode()
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backport of two fixes from develop to the develop-11.3 line: ensuring XCC ResultSequence resources are closed during ContentOutputFormat.initialize() to prevent connection/socket leaks, and correcting NodeImpl.isEqualNode() logic to avoid a null dereference and to perform proper equality checks.

Changes:

  • Wrap session.submitRequest(query) result handling in ContentOutputFormat.initialize() with try/finally to always close() the ResultSequence.
  • Fix NodeImpl.isEqualNode() by using the correct hasAttributes()/hasChildNodes() guards and negating child/attribute equality checks.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/com/marklogic/mapreduce/ContentOutputFormat.java Ensures ResultSequence is closed in initialize() and adjusts surrounding initialization flow.
src/main/java/com/marklogic/dom/NodeImpl.java Corrects node equality logic to avoid NPEs and produce correct results.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/com/marklogic/mapreduce/ContentOutputFormat.java
@vshaniga vshaniga merged commit 22eedf3 into develop-11.3 May 28, 2026
4 checks passed
@vshaniga vshaniga deleted the MLE-29898-MLE-29899-polaris-fix-11.3 branch May 28, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants