Skip to content

Handle null input in Maskify - #107

Closed
krotname wants to merge 1 commit into
mainfrom
codex/fix-maskify-method-null-pointer-issue
Closed

Handle null input in Maskify#107
krotname wants to merge 1 commit into
mainfrom
codex/fix-maskify-method-null-pointer-issue

Conversation

@krotname

@krotname krotname commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The Maskify.maskify method dereferenced its str parameter via str.length() and threw a NullPointerException when called with null, so a minimal robustness fix is needed.

Description

  • Add a null guard to Maskify.maskify so it returns null when called with a null argument and otherwise preserves the original masking behavior.
  • Add a regression test nullInputShouldRemainNull in MaskifyTest that asserts maskify(null) returns null.
  • Changes are minimal and limited to src/main/java/kyu7/Maskify.java and src/test/java/kyu7/MaskifyTest.java to avoid altering existing functionality.

Testing

  • Ran mvn -q -Dtest=MaskifyTest test and the test suite targeting the modified test passed successfully.
  • Ran mvn -q test for the full test suite and it completed successfully.

Codex Task

@krotname

krotname commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the validated combined merge in #115: #115

@krotname krotname closed this Aug 1, 2026
@krotname
krotname deleted the codex/fix-maskify-method-null-pointer-issue branch August 1, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant