ranger icon indicating copy to clipboard operation
ranger copied to clipboard

RANGER-5397: IllegalArgumentException in RangerRESTClient when no ran…

Open vyommani opened this issue 1 month ago • 0 comments

What changes were proposed in this pull request?

RangerBasePlugin initialization fails with an IllegalArgumentException when the ranger.plugin.<serviceType>.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 avatar Nov 12 '25 14:11 vyommani