Skip to content

MLE-29267: Fix bad use of null-like value and insufficient logging#602

Merged
vshaniga merged 1 commit into
marklogic:develop-11.3from
vshaniga:MLE-29267-fix-bad-use-of-null-value-11.3
May 5, 2026
Merged

MLE-29267: Fix bad use of null-like value and insufficient logging#602
vshaniga merged 1 commit into
marklogic:develop-11.3from
vshaniga:MLE-29267-fix-bad-use-of-null-value-11.3

Conversation

@vshaniga
Copy link
Copy Markdown
Collaborator

@vshaniga vshaniga commented May 4, 2026

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

Tests

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

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

Fixes several null-handling edge cases and improves diagnostic logging in mlcp/mapreduce code paths, aligning with the validated changes from PR #601 to prevent avoidable NPEs and make failures easier to diagnose.

Changes:

  • Prevent NPEs by adding explicit null guards in document reading, split parsing, and archive writing paths.
  • Ensure OutputArchive always initializes a zip output stream before writing entries.
  • Add error-level logging for security option construction failures before rethrowing configuration exceptions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main/java/com/marklogic/mapreduce/utilities/InternalUtilities.java Adds error logging when SecurityOptions construction fails.
src/main/java/com/marklogic/mapreduce/MarkLogicInputFormat.java Avoids NPE when ruleUris is absent by guarding add().
src/main/java/com/marklogic/mapreduce/DatabaseDocument.java Guards stream-to-byte[] buffering when the stream is null; falls back to empty content.
src/main/java/com/marklogic/contentpump/OutputArchive.java Ensures newOutputStream() is called whenever outputStream is null before putNextEntry().
src/main/java/com/marklogic/contentpump/DatabaseContentReader.java Adds null checks for item and result to avoid NPEs during metadata/iteration.

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

@vshaniga vshaniga merged commit 270d58d into marklogic:develop-11.3 May 5, 2026
7 checks passed
@vshaniga vshaniga deleted the MLE-29267-fix-bad-use-of-null-value-11.3 branch May 5, 2026 04:53
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