Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.x CDI.current().select(MetricRegistry.class).get() throws NPE #8209

Closed
tjquinno opened this issue Jan 8, 2024 · 0 comments · Fixed by #8210
Closed

4.x CDI.current().select(MetricRegistry.class).get() throws NPE #8209

tjquinno opened this issue Jan 8, 2024 · 0 comments · Fixed by #8210
Assignees
Labels
4.x Version 4.x bug Something isn't working metrics MP P2
Milestone

Comments

@tjquinno
Copy link
Member

tjquinno commented Jan 8, 2024

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

Attempting a programmatic look-up of MetricRegistry triggers an NPE.

Steps to reproduce

  1. In the MP QuickStart app, add the following line at the beginning of GreetResource#getDefaultMessage:
    MetricRegistry appRegistry = CDI.current().select(MetricRegistry.class).get();
    
  2. mvn clean package
    The unit tests fail because of an NPE in RegistryProducer because the producer method assumes the InjectionPoint passed is non-null as is its getAnnotated() value but in this case getAnnotated() is, reasonably, null.
@tjquinno tjquinno added bug Something isn't working MP metrics 4.x Version 4.x labels Jan 8, 2024
@tjquinno tjquinno added this to the 4.0.3 milestone Jan 8, 2024
@tjquinno tjquinno self-assigned this Jan 8, 2024
@tjquinno tjquinno added the P2 label Jan 8, 2024
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working metrics MP P2
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant