Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 25933 invoked from network); 30 Mar 2006 15:09:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Mar 2006 15:09:16 -0000 Received: (qmail 25832 invoked by uid 500); 30 Mar 2006 15:08:48 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 25800 invoked by uid 500); 30 Mar 2006 15:08:48 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 25790 invoked by uid 99); 30 Mar 2006 15:08:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2006 07:08:48 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2006 07:08:47 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id E748C6ACB3 for ; Thu, 30 Mar 2006 16:08:26 +0100 (BST) Message-ID: <976203495.1143731306944.JavaMail.jira@ajax> Date: Thu, 30 Mar 2006 16:08:26 +0100 (BST) From: "angela (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Assigned: (JCR-382) Setting WebDAV property without value causes NPE in DAVResourceImpl In-Reply-To: <1632296493.1143730347802.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JCR-382?page=all ] angela reassigned JCR-382: -------------------------- Assign To: angela > Setting WebDAV property without value causes NPE in DAVResourceImpl > ------------------------------------------------------------------- > > Key: JCR-382 > URL: http://issues.apache.org/jira/browse/JCR-382 > Project: Jackrabbit > Type: Bug > Components: webdav > Versions: 1.0 > Reporter: Rob Owen > Assignee: angela > > A WebDAV PROPPATCH of a property without a value causes a NPE in DAVResourceImpl when the value is retrieved and the toString() method called on it. Here is a patch that works around the problem. > Index: C:/jprojects/eclipse/jackrabbit/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java > =================================================================== > --- C:/jprojects/eclipse/jackrabbit/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java (revision 388517) > +++ C:/jprojects/eclipse/jackrabbit/jcr-server/server/src/java/org/apache/jackrabbit/webdav/simple/DavResourceImpl.java (working copy) > @@ -930,7 +930,10 @@ > */ > private void setJcrProperty(DavProperty property) throws RepositoryException { > // retrieve value > - String value = property.getValue().toString(); > + String value = ""; > + if (property.getValue() != null) { > + value = property.getValue().toString(); > + } > // set value; since multivalued-properties are not listed in the set > // of available properties, this extra validation-check is omitted. > node.setProperty(getJcrName(property.getName()), value); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira