RANGER-4118: Clean up warn in `org.apache.ranger.rest.ServiceREST` to simplify code
What changes were proposed in this pull request?
This pr is a minor change, it does't change the raw logic of these code, aims to only clean up warn in org.apache.ranger.rest.ServiceREST to simplify code.
How was this patch tested?
mvn clean test to test exist tests, and all tests passed
[INFO] Ranger Examples - Ranger Plugin for SampleApp ...... SUCCESS [ 2.116 s]
[INFO] sample-client ...................................... SUCCESS [ 3.048 s]
[INFO] Apache Ranger Examples Distribution ................ SUCCESS [ 0.698 s]
[INFO] Ranger Tools ....................................... SUCCESS [ 19.038 s]
[INFO] Atlas Security Plugin .............................. SUCCESS [ 2.822 s]
[INFO] SchemaRegistry Security Plugin ..................... SUCCESS [05:45 min]
[INFO] Sqoop Security Plugin .............................. SUCCESS [ 34.835 s]
[INFO] Sqoop Security Plugin Shim ......................... SUCCESS [ 5.525 s]
[INFO] Kylin Security Plugin .............................. SUCCESS [04:21 min]
[INFO] Kylin Security Plugin Shim ......................... SUCCESS [ 6.776 s]
[INFO] Elasticsearch Security Plugin Shim ................. SUCCESS [ 16.800 s]
[INFO] Elasticsearch Security Plugin ...................... SUCCESS [ 2.367 s]
[INFO] Apache Ranger Distribution ......................... SUCCESS [ 0.083 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:18 h
[INFO] Finished at: 2023-03-09T11:30:51+08:00
[INFO] ------------------------------------------------------------------------
Please create a jira and mention the ticket number in the header, you may take a look at recently closed PRs.
Please attach testing results in the description as mentioned in this doc: https://cwiki.apache.org/confluence/display/RANGER/Working+with+PRs+on+GitHub
Please attach testing results in the description as mentioned in this doc: https://cwiki.apache.org/confluence/display/RANGER/Working+with+PRs+on+GitHub
done