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

Add null check to MP Server.Builder.config() #5022

Closed
tomas-langer opened this issue Sep 30, 2022 · 3 comments
Closed

Add null check to MP Server.Builder.config() #5022

tomas-langer opened this issue Sep 30, 2022 · 3 comments
Assignees
Labels
2.x Issues for 2.x version branch config P2

Comments

@tomas-langer
Copy link
Member

Make sure we throw NPE early in io.helidon.microprofile.server.Server.Builder.config(Config) - both for SE config and MP config
Same in MpConfigSources.create(Config)

@tomas-langer
Copy link
Member Author

Related to issue reported by customer, where we get a NPE at runtime from internals with the following stack trace:

Exception in thread "main" java.lang.NullPointerException
        at io.helidon.config.mp.MpHelidonConfigSource.getValue(MpHelidonConfigSource.java:48)
        at org.eclipse.microprofile.config.spi.ConfigSource.getOrdinal(ConfigSource.java:152)
        at io.helidon.config.mp.MpConfigBuilder$OrdinalSource.findOrdinal(MpConfigBuilder.java:493)
        at io.helidon.config.mp.MpConfigBuilder$OrdinalSource.<init>(MpConfigBuilder.java:484)
        at io.helidon.config.mp.MpConfigBuilder.withSources(MpConfigBuilder.java:202)
        at io.helidon.microprofile.server.Server$Builder.config(Server.java:323)

@barchetta barchetta added bug Something isn't working and removed bug Something isn't working labels Oct 24, 2022
@m0mus m0mus added the P2 label Nov 3, 2022
@klustria
Copy link
Member

Created PR #5363 as potential fix.

@klustria klustria added the 2.x Issues for 2.x version branch label Nov 10, 2022
@klustria
Copy link
Member

klustria commented Nov 10, 2022

Merge of PR #5363 completed, hence closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch config P2
Projects
Archived in project
Development

No branches or pull requests

4 participants