You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by GitBox <gi...@apache.org> on 2021/05/08 05:46:15 UTC

[GitHub] [karaf] jbonofre opened a new pull request #1375: [KARAF-7097] Fix json config array comparison

jbonofre opened a new pull request #1375:
URL: https://github.com/apache/karaf/pull/1375


   


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



[GitHub] [karaf] oliverlietz removed a comment on pull request #1375: [KARAF-7097] Fix json config array comparison

Posted by GitBox <gi...@apache.org>.
oliverlietz removed a comment on pull request #1375:
URL: https://github.com/apache/karaf/pull/1375#issuecomment-835301138


   `updated` must never become `false` again once `true`:
   
   ```
               for (String key : old.keySet()) {
                   Object oldValue = old.get(key);
                   Object propertiesValue = properties.get(key);
                   if (oldValue instanceof Object[] && propertiesValue instanceof Object[]) {
                       if (!Arrays.deepEquals((Object[]) oldValue, (Object[]) propertiesValue)) {
                           updated = true;
                       }
                   } else {
                       if (!oldValue.equals(propertiesValue)) {
                           updated = true;
                       }
                   }
               }
   ```


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



[GitHub] [karaf] oliverlietz commented on pull request #1375: [KARAF-7097] Fix json config array comparison

Posted by GitBox <gi...@apache.org>.
oliverlietz commented on pull request #1375:
URL: https://github.com/apache/karaf/pull/1375#issuecomment-835301138


   `updated` must never become `false` again once `true`:
   
   ```
               for (String key : old.keySet()) {
                   Object oldValue = old.get(key);
                   Object propertiesValue = properties.get(key);
                   if (oldValue instanceof Object[] && propertiesValue instanceof Object[]) {
                       if (!Arrays.deepEquals((Object[]) oldValue, (Object[]) propertiesValue)) {
                           updated = true;
                       }
                   } else {
                       if (!oldValue.equals(propertiesValue)) {
                           updated = true;
                       }
                   }
               }
   ```


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



[GitHub] [karaf] jbonofre merged pull request #1375: [KARAF-7097] Fix json config array comparison

Posted by GitBox <gi...@apache.org>.
jbonofre merged pull request #1375:
URL: https://github.com/apache/karaf/pull/1375


   


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