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

Fix NPE when client is on classpath but not configured #656

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

melix
Copy link
Collaborator

@melix melix commented Jul 10, 2024

Because of user errors (for example explicitly adding the test resources client even if disabled) or simply because the test resources extensions have the client as a transitive dependency, it is possible to have the test resources client present on classpath even if test resources are disabled. In that case, the client wouldn't be configurable.

This commit fixes what the client returns in case there's no test resources service configured, by returning reasonable defaults instead of null.

Fixes #651

@melix melix added the type: bug Something isn't working label Jul 10, 2024
@melix melix added this to the 2.5.3 milestone Jul 10, 2024
@melix melix requested a review from alvarosanchez July 10, 2024 14:23
Because of user errors (for example explicitly adding the test
resources client even if disabled) or simply because the test
resources extensions have the client as a transitive dependency,
it is possible to have the test resources client present on
classpath even if test resources are disabled. In that case,
the client wouldn't be configurable.

This commit fixes what the client returns in case there's no
test resources service configured, by returning reasonable
defaults instead of null.

Fixes #651
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@melix melix merged commit 181e937 into 2.5.x Jul 10, 2024
10 of 11 checks passed
@melix melix deleted the cc/issue-651 branch July 10, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants