Author: ningjiang
Date: Tue Oct 14 18:06:02 2008
New Revision: 704755
URL: http://svn.apache.org/viewvc?rev=704755&view=rev
Log:
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.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java?rev=704755&r1=704754&r2=704755&view=diff
==============================================================================
---
cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java
(original)
+++
cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/message/MessageUtils.java
Tue Oct 14 18:06:02 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;
}