commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1067606 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java
Date Sun, 06 Feb 2011 06:58:08 GMT
Author: bayard
Date: Sun Feb  6 06:58:08 2011
New Revision: 1067606

URL: http://svn.apache.org/viewvc?rev=1067606&view=rev
Log:
Adding note on potential NPE if autoboxing occurs per LANG-676

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java?rev=1067606&r1=1067605&r2=1067606&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/BooleanUtils.java Sun
Feb  6 06:58:08 2011
@@ -52,6 +52,8 @@ public class BooleanUtils {
      * 
      * <p>If <code>null</code> is passed in, <code>null</code>
will be returned.</p>
      *
+     * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed
to a boolean. </p>
+     *
      * <pre>
      *   BooleanUtils.negate(Boolean.TRUE)  = Boolean.FALSE;
      *   BooleanUtils.negate(Boolean.FALSE) = Boolean.TRUE;
@@ -234,6 +236,8 @@ public class BooleanUtils {
      * 
      * <p><code>null</code> will be converted to <code>null</code>.</p>
      *
+     * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed
to a boolean. </p>
+     *
      * <pre>
      *   BooleanUtils.toBoolean(new Integer(0))    = Boolean.FALSE
      *   BooleanUtils.toBoolean(new Integer(1))    = Boolean.TRUE
@@ -315,6 +319,8 @@ public class BooleanUtils {
     /**
      * <p>Converts an int to a Boolean specifying the conversion values.</p>
      * 
+     * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed
to a boolean. </p>
+     *
      * <pre>
      *   BooleanUtils.toBooleanObject(0, 0, 2, 3) = Boolean.TRUE
      *   BooleanUtils.toBooleanObject(2, 1, 2, 3) = Boolean.FALSE
@@ -343,6 +349,8 @@ public class BooleanUtils {
     /**
      * <p>Converts an Integer to a Boolean specifying the conversion values.</p>
      * 
+     * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed
to a boolean. </p>
+     *
      * <pre>
      *   BooleanUtils.toBooleanObject(new Integer(0), new Integer(0), new Integer(2), new
Integer(3)) = Boolean.TRUE
      *   BooleanUtils.toBooleanObject(new Integer(2), new Integer(1), new Integer(2), new
Integer(3)) = Boolean.FALSE
@@ -528,6 +536,8 @@ public class BooleanUtils {
      * (case insensitive) will return <code>false</code>.
      * Otherwise, <code>null</code> is returned.</p>
      *
+     * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed
to a boolean. </p>
+     *
      * <pre>
      *   BooleanUtils.toBooleanObject(null)    = null
      *   BooleanUtils.toBooleanObject("true")  = Boolean.TRUE
@@ -642,6 +652,8 @@ public class BooleanUtils {
     /**
      * <p>Converts a String to a Boolean throwing an exception if no match.</p>
      *
+     * <p>NOTE: This returns null and will throw a NullPointerException if autoboxed
to a boolean. </p>
+     *
      * <pre>
      *   BooleanUtils.toBooleanObject("true", "true", "false", "null")  = Boolean.TRUE
      *   BooleanUtils.toBooleanObject("false", "true", "false", "null") = Boolean.FALSE



Mime
View raw message