Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B43DB19E0D for ; Tue, 29 Mar 2016 10:30:26 +0000 (UTC) Received: (qmail 97167 invoked by uid 500); 29 Mar 2016 10:30:26 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 97102 invoked by uid 500); 29 Mar 2016 10:30:26 -0000 Mailing-List: contact issues-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 issues@cxf.apache.org Received: (qmail 96959 invoked by uid 99); 29 Mar 2016 10:30:26 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2016 10:30:26 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C8A492C1F6A for ; Tue, 29 Mar 2016 10:30:25 +0000 (UTC) Date: Tue, 29 Mar 2016 10:30:25 +0000 (UTC) From: =?utf-8?Q?Francesco_Chicchiricc=C3=B2_=28JIRA=29?= To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CXF-6845) Some methods in MessageUtils prone to NPE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6845?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Francesco Chicchiricc=C3=B2 reassigned CXF-6845: ------------------------------------------- Assignee: Francesco Chicchiricc=C3=B2 > Some methods in MessageUtils prone to NPE > ----------------------------------------- > > Key: CXF-6845 > URL: https://issues.apache.org/jira/browse/CXF-6845 > Project: CXF > Issue Type: Bug > Affects Versions: 3.0.9 > Reporter: Francesco Chicchiricc=C3=B2 > Assignee: Francesco Chicchiricc=C3=B2 > Fix For: 3.0.10, 3.1.7, 3.2.0 > > Attachments: CXF-6845.diff > > > When attempting to upgrade Syncope 1.2 from CXF 3.0.8 to 3.0.9, I receive= NPE due to some methods in {{MessageUtils}} - see for example > {code} > public static boolean getContextualBoolean(Message m, String key, boo= lean defaultValue) { > Object o =3D m.getContextualProperty(key); > if (o !=3D null) { > return PropertyUtils.isTrue(o); > } > return defaultValue; > } > {code} > As you can see, if {{m}} is NULL, NPE is thrown. > See for reference the same method from 3.1.6: > {code} > public static boolean getContextualBoolean(Message m, String key, boo= lean defaultValue) { > if (m !=3D null) { > Object o =3D m.getContextualProperty(key); > if (o !=3D null) { > return PropertyUtils.isTrue(o); > } > } > return defaultValue; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)