sfc-gh-rpaulin commented on code in PR #10750:
URL: https://github.com/apache/nifi/pull/10750#discussion_r2687553683


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java:
##########
@@ -140,7 +142,7 @@
 public class StandardProcessorNode extends ProcessorNode implements 
Connectable {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(StandardProcessorNode.class);
-
+    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();

Review Comment:
   Given that objects will likely live in different classloaders should be be 
more forgiving in what we accept here?  For example should fail fast if unknown 
properties are found?  Should null values be ignored during serialization?
   
   ```
   private static final ObjectMapper OBJECT_MAPPER = new 
ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, 
false);
   static {
       OBJECT_MAPPER.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL)
   }
   ```
   
   Ideally these objects should always be kept insync so there is an argument 
to say failing fast may be preferred.  However in the case where the object 
passed as the parameter might contain fields not present in the 
processor/controller service being invoked due to version upgrades etc it might 
cause us to keep deprecated fields just to prevent errors.
   
   This comment would apply to all the OBJECT_MAPPER objects in the PR.



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