Skip to content

fix(dm): null-safe columnType comparison in DMMetaData - #2156

Open
Aias00 wants to merge 3 commits into
OtterMind:mainfrom
Aias00:fix/2150-dmmetadata-npe
Open

fix(dm): null-safe columnType comparison in DMMetaData#2156
Aias00 wants to merge 3 commits into
OtterMind:mainfrom
Aias00:fix/2150-dmmetadata-npe

Conversation

@Aias00

@Aias00 Aias00 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Related issue

Closes #2150

Summary

DMMetaData.columns called columnType.toUpperCase() without a null guard; if TYPE_NAME was null, NPE. Changed to StringUtils.equalsIgnoreCase (null-safe), mirroring OscarMetaData.

Verification

  • mvn compile -> BUILD SUCCESS.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.

columns() called columnType.toUpperCase() without a null guard; if
TYPE_NAME was null, NPE. Use StringUtils.equalsIgnoreCase (null-safe),
mirroring the OscarMetaData sibling.

Fixes OtterMind#2150

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 26, 2026 06:47
@Aias00
Aias00 requested a review from openai0229 as a code owner July 26, 2026 06:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@openai0229

Copy link
Copy Markdown
Contributor

StringUtils.equalsIgnoreCase is null-safe and the implementation direction is correct, but this PR is not ready to merge without an automated regression test.

Please add a DMMetaData test with a metadata row whose column type is null to prove there is no exception, plus a mixed-case TIMESTAMP row to prove the existing column-size behavior is preserved. Rebase onto the latest main before requesting another review; #2198 also changes this class and will need to be coordinated.

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.

DMMetaData NPE on null columnType (toUpperCase without guard)

3 participants