You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/04/20 03:10:04 UTC

[GitHub] [commons-lang] Isira-Seneviratne opened a new pull request #522: Add allNull() and anyNull() methods to ObjectUtils.

Isira-Seneviratne opened a new pull request #522:
URL: https://github.com/apache/commons-lang/pull/522


   


----------------------------------------------------------------
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] [commons-lang] garydgregory merged pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
garydgregory merged pull request #522:
URL: https://github.com/apache/commons-lang/pull/522


   


----------------------------------------------------------------
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] [commons-lang] coveralls commented on issue #522: Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-616286835


   
   [![Coverage Status](https://coveralls.io/builds/30183766/badge)](https://coveralls.io/builds/30183766)
   
   Coverage increased (+0.0006%) to 95.094% when pulling **83ebec5a786498adaab94dd986e53015f8e47641 on Isira-Seneviratne:Add_anyNull_and_allNull_to_ObjectUtils** into **7f45b8898b804f0fe4fa55c088ff4a99a56af277 on apache:master**.
   


----------------------------------------------------------------
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] [commons-lang] Isira-Seneviratne commented on pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
Isira-Seneviratne commented on pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-624506904


   On Wed, May 6, 2020, 1:44 PM Rajesh Kumar Karnena <no...@github.com>
   wrote:
   
   > *@raj76kk* commented on this pull request.
   >
   > Method doc is incorrect
   > ------------------------------
   >
   > In src/main/java/org/apache/commons/lang3/ObjectUtils.java
   > <https://github.com/apache/commons-lang/pull/522#discussion_r420615217>:
   >
   > > +     * If all the values are {@code null} or the array is {@code null}
   > +     * or empty, then {@code true} is returned, otherwise {@code false} is returned.
   >
   > Wrong method doc. Shouldn't it be?
   > If any of the values are {@code null} or the array is {@code null}, then
   > {@code true} is returned, otherwise {@code false} is returned
   > ------------------------------
   >
   > In src/main/java/org/apache/commons/lang3/ObjectUtils.java
   > <https://github.com/apache/commons-lang/pull/522#discussion_r420615752>:
   >
   > > +     * ObjectUtils.anyNull(*, null)          = false
   > +     * ObjectUtils.anyNull(null, *)          = false
   > +     * ObjectUtils.anyNull(null, null, *, *) = false
   >
   > Incorrect examples
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/commons-lang/pull/522#pullrequestreview-406388821>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AHMXFEW7JXTI2Q5V52UA6JTRQEL6FANCNFSM4MMCUNVQ>
   > .
   >
   
   My bad, thanks!
   
   >
   


----------------------------------------------------------------
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] [commons-lang] Isira-Seneviratne commented on a change in pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
Isira-Seneviratne commented on a change in pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#discussion_r452545234



##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
         return object != null ? object : defaultSupplier == null ? null : defaultSupplier.get();
     }
 
+    /**
+     * Checks if any value in the given array is {@code null}.
+     *
+     * <p>
+     * If all the values are {@code null} or the array is {@code null}
+     * or empty, then {@code true} is returned, otherwise {@code false} is returned.
+     * </p>
+     *
+     * <pre>
+     * ObjectUtils.anyNull(*)                = false
+     * ObjectUtils.anyNull(*, null)          = false
+     * ObjectUtils.anyNull(null, *)          = false
+     * ObjectUtils.anyNull(null, null, *, *) = false
+     * ObjectUtils.anyNull(null)             = true
+     * ObjectUtils.anyNull(null, null)       = true
+     * </pre>
+     *
+     * @param values  the values to test, may be {@code null} or empty
+     * @return {@code true} if there is at least one {@code null} value in the array,
+     * {@code false} if all the values are non-null.
+     * If the array is {@code null} or empty, {@code true} is also returned.
+     * @since 3.10.1

Review comment:
       Okay, I'll correct it :)




----------------------------------------------------------------
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] [commons-lang] raj76kk commented on a change in pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
raj76kk commented on a change in pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#discussion_r420615752



##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
         return object != null ? object : defaultSupplier == null ? null : defaultSupplier.get();
     }
 
+    /**
+     * Checks if any value in the given array is {@code null}.
+     *
+     * <p>
+     * If all the values are {@code null} or the array is {@code null}
+     * or empty, then {@code true} is returned, otherwise {@code false} is returned.
+     * </p>
+     *
+     * <pre>
+     * ObjectUtils.anyNull(*)                = false
+     * ObjectUtils.anyNull(*, null)          = false
+     * ObjectUtils.anyNull(null, *)          = false
+     * ObjectUtils.anyNull(null, null, *, *) = false

Review comment:
       Incorrect examples
   ```suggestion
        * ObjectUtils.anyNull(*, null)          = true
        * ObjectUtils.anyNull(null, *)          = true
        * ObjectUtils.anyNull(null, null, *, *) = 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] [commons-lang] garydgregory commented on pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-656431563


   @Isira-Seneviratne 
   May you resolve here this one as well please?


----------------------------------------------------------------
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] [commons-lang] raj76kk commented on a change in pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
raj76kk commented on a change in pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#discussion_r420615217



##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
         return object != null ? object : defaultSupplier == null ? null : defaultSupplier.get();
     }
 
+    /**
+     * Checks if any value in the given array is {@code null}.
+     *
+     * <p>
+     * If all the values are {@code null} or the array is {@code null}
+     * or empty, then {@code true} is returned, otherwise {@code false} is returned.

Review comment:
       Wrong method doc. Shouldn't it be?
   `If any of the values are {@code null} or the array is {@code null}, then {@code true} is returned, otherwise {@code false} is returned`

##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
         return object != null ? object : defaultSupplier == null ? null : defaultSupplier.get();
     }
 
+    /**
+     * Checks if any value in the given array is {@code null}.
+     *
+     * <p>
+     * If all the values are {@code null} or the array is {@code null}
+     * or empty, then {@code true} is returned, otherwise {@code false} is returned.
+     * </p>
+     *
+     * <pre>
+     * ObjectUtils.anyNull(*)                = false
+     * ObjectUtils.anyNull(*, null)          = false
+     * ObjectUtils.anyNull(null, *)          = false
+     * ObjectUtils.anyNull(null, null, *, *) = false

Review comment:
       Incorrect examples




----------------------------------------------------------------
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] [commons-lang] raj76kk commented on a change in pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
raj76kk commented on a change in pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#discussion_r420615217



##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
         return object != null ? object : defaultSupplier == null ? null : defaultSupplier.get();
     }
 
+    /**
+     * Checks if any value in the given array is {@code null}.
+     *
+     * <p>
+     * If all the values are {@code null} or the array is {@code null}
+     * or empty, then {@code true} is returned, otherwise {@code false} is returned.

Review comment:
       Wrong method doc. Shouldn't it be?
   
   ```suggestion
        * If any the values are {@code null} or the array is {@code null},
        * then {@code true} is returned, otherwise {@code false} is returned.
   ```




----------------------------------------------------------------
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] [commons-lang] coveralls edited a comment on pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-616286835


   
   [![Coverage Status](https://coveralls.io/builds/30592739/badge)](https://coveralls.io/builds/30592739)
   
   Coverage decreased (-0.002%) to 95.092% when pulling **1c3ee4d92c9f947c9c1c54da923526e0c8c2c525 on Isira-Seneviratne:Add_anyNull_and_allNull_to_ObjectUtils** into **7f45b8898b804f0fe4fa55c088ff4a99a56af277 on apache:master**.
   


----------------------------------------------------------------
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] [commons-lang] raj76kk commented on pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
raj76kk commented on pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-624541251


   Looks Good :) 


----------------------------------------------------------------
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] [commons-lang] garydgregory commented on a change in pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
garydgregory commented on a change in pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#discussion_r411379236



##########
File path: src/main/java/org/apache/commons/lang3/ObjectUtils.java
##########
@@ -277,6 +277,33 @@ public static boolean isNotEmpty(final Object object) {
         return object != null ? object : defaultSupplier == null ? null : defaultSupplier.get();
     }
 
+    /**
+     * Checks if any value in the given array is {@code null}.
+     *
+     * <p>
+     * If all the values are {@code null} or the array is {@code null}
+     * or empty, then {@code true} is returned, otherwise {@code false} is returned.
+     * </p>
+     *
+     * <pre>
+     * ObjectUtils.anyNull(*)                = false
+     * ObjectUtils.anyNull(*, null)          = false
+     * ObjectUtils.anyNull(null, *)          = false
+     * ObjectUtils.anyNull(null, null, *, *) = false
+     * ObjectUtils.anyNull(null)             = true
+     * ObjectUtils.anyNull(null, null)       = true
+     * </pre>
+     *
+     * @param values  the values to test, may be {@code null} or empty
+     * @return {@code true} if there is at least one {@code null} value in the array,
+     * {@code false} if all the values are non-null.
+     * If the array is {@code null} or empty, {@code true} is also returned.
+     * @since 3.10.1

Review comment:
       New APIs will mean a minor release (not maintenance), per semantic versioning guidelines, so `@since 3.11` is best for these new APIs :-)




----------------------------------------------------------------
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] [commons-lang] coveralls edited a comment on pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-616286835


   
   [![Coverage Status](https://coveralls.io/builds/31982226/badge)](https://coveralls.io/builds/31982226)
   
   Coverage increased (+0.0007%) to 94.599% when pulling **ee6c682ed5fa8c1b33aa1d52a1e2f088b0191b6b on Isira-Seneviratne:Add_anyNull_and_allNull_to_ObjectUtils** into **1fc15b43d4b243262d6383d2e5a554a2158aa57f on apache:master**.
   


----------------------------------------------------------------
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] [commons-lang] Isira-Seneviratne commented on pull request #522: [LANG-1539] Add allNull() and anyNull() methods to ObjectUtils.

Posted by GitBox <gi...@apache.org>.
Isira-Seneviratne commented on pull request #522:
URL: https://github.com/apache/commons-lang/pull/522#issuecomment-624513579


   Corrected the Javadoc. Please tell me if there's anything else :)


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