NissimShiman commented on PR #7781:
URL: https://github.com/apache/nifi/pull/7781#issuecomment-1773201080

   Thank you @exceptionfactory for all the cycles spent to improve this PR and 
for pointing out the new `migrateProperties()` feature      This is really neat 
addition.
   
   Unfortunately I am running into some undesired behaviour when trying to 
implement.
   
   The code is:
   ```
    @Override
       public void migrateProperties(PropertyConfiguration config) {
           if (!config.hasProperty(CONFIG_STRATEGY)) {
               if (config.isPropertySet(MIME_CONFIG_FILE) || 
config.isPropertySet(MIME_CONFIG_BODY)) {
                   config.setProperty(CONFIG_STRATEGY, REPLACE.getValue());
               }
           }
       }
   ```
   
   For some reason, the first `if` is always evaluating as false, even when 
migrating from a 1.x flow.
   
   Still looking into this.
   
   (The first `if` needs to be there as `PRESET` can have `CONFIG_BODY` / 
`CONFIG_FILE`, set but they will be ignored.  Without the first `if`, these 
will become `REPLACE` on a nifi bounce.) 


-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to