8000 fix: add null safety to MicrometerComponent metric cleanup by kawasima · Pull Request #120 · enkan/enkan · GitHub
[go: up one dir, main page]

Skip to content

fix: add null safety to MicrometerComponent metric cleanup - #120

Merged
kawasima merged 1 commit into
developfrom
feature/micrometer-null-safety
Mar 29, 2026
Merged

kawasima merged 1 commit into
developfrom
feature/micrometer-null-safety

Conversation

@kawasima
Copy link
Copy Markdown
Collaborator

Summary

  • Extract registerMetrics() / removeMetrics() helpers from lifecycle anonymous class
  • Add null checks before registry.remove() calls to prevent passing null to Micrometer's @NonNull parameters
  • Suppresses IDE null type safety warnings without changing behavior

Test plan

  • All 5 MicrometerComponent tests pass (including reportsNotStartedWhenComponentNotStarted)

🤖 Generated with Claude Code

…arnings

Extract registerMetrics/removeMetrics helpers and guard remove() calls
with null checks to prevent passing null to Micrometer's @nonnull
parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kawasima
kawasima force-pushed the feature/micrometer-null-safety branch from 217b4ad to 0d16eca Compare March 29, 2026 00:02
@kawasima
kawasima merged commit 2b882ff into develop Mar 29, 2026
1 check passed
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.

1 participant

0