cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r704757 - in /cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/message/MessageUtils.java
Date Wed, 15 Oct 2008 01:17:08 GMT
Author: ningjiang
Date: Tue Oct 14 18:17:08 2008
New Revision: 704757

URL: http://svn.apache.org/viewvc?rev=704757&view=rev
Log:
Merged revisions 704755 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.1.x-fixes

................
  r704755 | ningjiang | 2008-10-15 09:06:02 +0800 (Wed, 15 Oct 2008) | 9 lines
  
  Merged revisions 704731 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r704731 | bimargulies | 2008-10-15 07:00:39 +0800 (Wed, 15 Oct 2008) | 2 lines
    
    Fix CXF-1859.
  ........
................

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java?rev=704757&r1=704756&r2=704757&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java (original)
+++ cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java Tue
Oct 14 18:17:08 2008
@@ -101,12 +101,16 @@
     }
     
     /**
-     * Returns true if a value is either the String "true" or Boolean.TRUE.
+     * Returns true if a value is either the String "true" (regardless of case)  or Boolean.TRUE.
      * @param value
      * @return true iff value is either the String "true" or Boolean.TRUE
      */
     public static boolean isTrue(Object value) {
-        if (Boolean.TRUE.equals(value) || "true".equals(value)) {
+        if (value == null) {
+            return false;
+        }
+
+        if (Boolean.TRUE.equals(value) || "true".equalsIgnoreCase(value.toString())) {
             return true;
         }
         



Mime
View raw message