mneethiraj commented on code in PR #430:
URL: https://github.com/apache/ranger/pull/430#discussion_r1876340797
##########
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java:
##########
@@ -84,13 +82,12 @@ public HashMap<String, Object> connectionTest() {
connectivityStatus = true;
} else {
connectivityStatus = false;
- errMsg = "Status Code = " + response.getStatus();
+ errMsg = "Status Code = " + response.getStatus();
}
-
} catch (Exception e) {
LOG.error("Connection to NiFi failed due to " + e.getMessage(), e);
Review Comment:
Replace string concat with parameterized log call. Please update other
occurrences as well.
```
LOG.error("Connection to NiFi failed due to {}", e.getMessage(), e);
```
##########
plugin-nifi-registry/src/main/java/org/apache/ranger/services/nifi/registry/client/NiFiRegistryClient.java:
##########
@@ -50,30 +51,27 @@
* Client to communicate with NiFi Registry and retrieve available resources.
*/
public class NiFiRegistryClient {
-
- private static final Logger LOG =
LoggerFactory.getLogger(NiFiRegistryClient.class);
-
static final String SUCCESS_MSG = "ConnectionTest Successful";
static final String FAILURE_MSG = "Unable to retrieve any resources using
given parameters. ";
-
- private final String url;
- private final SSLContext sslContext;
+ private static final Logger LOG =
LoggerFactory.getLogger(NiFiRegistryClient.class);
Review Comment:
To be consistent, move instantiation of LOG to top of class definition.
Please review all other occurrences as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]