Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 6678 invoked from network); 15 Oct 2008 01:06:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Oct 2008 01:06:24 -0000 Received: (qmail 8504 invoked by uid 500); 15 Oct 2008 01:06:24 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 8432 invoked by uid 500); 15 Oct 2008 01:06:24 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 8423 invoked by uid 99); 15 Oct 2008 01:06:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Oct 2008 18:06:24 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Oct 2008 01:05:25 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 34E1B238889E; Tue, 14 Oct 2008 18:06:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r704755 - in /cxf/branches/2.1.x-fixes: ./ api/src/main/java/org/apache/cxf/message/MessageUtils.java Date: Wed, 15 Oct 2008 01:06:03 -0000 To: commits@cxf.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081015010603.34E1B238889E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }