Skip to content

Conversation

@vyommani
Copy link
Contributor

What changes were proposed in this pull request?

RangerBasePlugin initialization fails with an IllegalArgumentException when the ranger.plugin..policy.rest.url property is not set.
The issue occurs because getConfiguredURLs() returns an empty list, causing Random.nextInt(0) to throw an exception.

How was this patch tested?

wrote a new test TestRangerRESTClient.testPluginInit_WithNoUrl_DoesNotCrash() this will fail without fix and pass with fix.

@vyommani
Copy link
Contributor Author

create a new pr from the old approved one(#732). In this PR i migrated the test to use junit 5.

@pradeepagrawal8184 pradeepagrawal8184 merged commit d21032d into apache:master Dec 31, 2025
3 of 4 checks passed
mneethiraj pushed a commit that referenced this pull request Jan 2, 2026
…ger.plugin.<service>.policy.rest.url is configured (#779)

* RANGER-5397: IllegalArgumentException in RangerRESTClient when no ranger.plugin.<service>.policy.rest.url is configured

* fixed checkstyle issues.

* change the code to throw IAE if url is not set.

* migrated test to junit 5

(cherry picked from commit d21032d)
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.

2 participants