nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] pvillard31 commented on a change in pull request #4067: NIFI-7178 - Handle the case when schema is not available
Date Fri, 21 Feb 2020 17:49:37 GMT
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

Mime
View raw message