You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/02/21 17:49:37 UTC

[GitHub] [nifi] pvillard31 commented on a change in pull request #4067: NIFI-7178 - Handle the case when schema is not available

pvillard31 commented on a change in pull request #4067: NIFI-7178 - Handle the case when schema is not available
URL: https://github.com/apache/nifi/pull/4067#discussion_r382719408
 
 

 ##########
 File path: nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonPathRowRecordReader.java
 ##########
 @@ -180,7 +181,7 @@ protected Object convert(final Object value, final DataType dataType, final Stri
             return new MapRecord(childSchema, values);
         }
 
-        if (value instanceof String) {
+        if (value instanceof String && Objects.nonNull(dataType)) {
 
 Review comment:
   To be consistent with the checks done in other parts of the code, would you be ok with?
   ```suggestion
           if (dataType != null && value instanceof String) {
   ```
   
   If yes, the Objects import should be removed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services