Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2560#discussion_r175286408
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/PutMongo.java
 ---
    @@ -137,6 +151,31 @@
             return propertyDescriptors;
         }
     
    +    @Override
    +    protected Collection<ValidationResult> customValidate(final 
ValidationContext validationContext) {
    +        List<ValidationResult> problems = new ArrayList<>();
    +
    +        final boolean queryKey = 
validationContext.getProperty(UPDATE_QUERY_KEY).isSet()
    +                && 
!StringUtils.isBlank(validationContext.getProperty(UPDATE_QUERY_KEY).getValue());
    --- End diff --
    
    I just remembered why I did this. When you call `removeProperty` to unset 
the property, the `getProperty` call here will return the default value. So 
maybe I need to remove the default value. What do you think? Is this a problem 
with the test helpers or my understanding of how properties should work?


---

Reply via email to