ChrisSamo632 commented on a change in pull request #5193:
URL: https://github.com/apache/nifi/pull/5193#discussion_r676471395



##########
File path: 
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service-api/src/main/java/org/apache/nifi/elasticsearch/IndexOperationResponse.java
##########
@@ -40,7 +40,8 @@ public boolean hasErrors() {
         return hasErrors;
     }
 
-    public static IndexOperationResponse fromJsonResponse(String response) 
throws IOException {
+    @SuppressWarnings("unchecked")
+    public static IndexOperationResponse fromJsonResponse(final String 
response) throws IOException {
         ObjectMapper mapper = new ObjectMapper();

Review comment:
       Use of an `ObjectReader` would require an `ObjectMapper` to be created 
first (the `ObjectReader` constructors need either an `ObjectMapper` or 
`ObjectReader`)... but absolutely, this should be a class-level constant, so 
that's easy to do

##########
File path: 
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service-api/src/main/java/org/apache/nifi/elasticsearch/IndexOperationResponse.java
##########
@@ -40,7 +40,8 @@ public boolean hasErrors() {
         return hasErrors;
     }
 
-    public static IndexOperationResponse fromJsonResponse(String response) 
throws IOException {
+    @SuppressWarnings("unchecked")
+    public static IndexOperationResponse fromJsonResponse(final String 
response) throws IOException {
         ObjectMapper mapper = new ObjectMapper();

Review comment:
       Use of an `ObjectReader` would require an `ObjectMapper` to be created 
first (the `ObjectReader` constructors need either an `ObjectMapper` or 
`ObjectReader`)... but absolutely, this `ObjectMapper` should be a class-level 
constant, so that's easy to do




-- 
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]


Reply via email to