Skip to content

Commit bb84319

Browse files
Revert "RANGER-5397: IllegalArgumentException in RangerRESTClient when no ran…" (#778)
This reverts commit 464bfd9.
1 parent 464bfd9 commit bb84319

File tree

2 files changed

+3
-55
lines changed

2 files changed

+3
-55
lines changed

agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRESTClient.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ public RangerRESTClient(String url, String sslConfigFileName, Configuration conf
110110
mUrl = url;
111111
mSslConfigFileName = sslConfigFileName;
112112
configuredURLs = StringUtil.getURLs(mUrl);
113-
if (StringUtil.isEmpty(url)) {
114-
throw new IllegalArgumentException("Ranger URL is null or empty. Likely caused by incorrect configuration");
115-
} else {
116-
setLastKnownActiveUrlIndex((new Random()).nextInt(getConfiguredURLs().size()));
117-
}
113+
114+
setLastKnownActiveUrlIndex((new Random()).nextInt(getConfiguredURLs().size()));
115+
118116
init(config);
119117
}
120118

agents-common/src/test/java/org/apache/ranger/plugin/util/TestRangerRESTClient.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)