Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 95835 invoked from network); 9 May 2007 15:14:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 May 2007 15:14:49 -0000 Received: (qmail 17372 invoked by uid 500); 9 May 2007 15:14:45 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 17314 invoked by uid 500); 9 May 2007 15:14:44 -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 17183 invoked by uid 99); 9 May 2007 15:14:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2007 08:14:44 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2007 08:14:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7688D714068 for ; Wed, 9 May 2007 08:14:15 -0700 (PDT) Message-ID: <2281011.1178723655483.JavaMail.jira@brutus> Date: Wed, 9 May 2007 08:14:15 -0700 (PDT) From: "Bob Wieler (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-908) Unable to properly restore a previous version of a node that contains multivalue properties. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Unable to properly restore a previous version of a node that contains multivalue properties. -------------------------------------------------------------------------------------------- Key: JCR-908 URL: https://issues.apache.org/jira/browse/JCR-908 Project: Jackrabbit Issue Type: Bug Components: core Affects Versions: 1.3 Reporter: Bob Wieler An ArrayIndexOutOfBoundsException occurs when I am trying to restore a previous version of a node when it contains empty multi value properties. Here is a stack trace for where in he core code the exception is occurring: Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.jackrabbit.core.NodeImpl.restoreFrozenState(NodeImpl.java:3856) at org.apache.jackrabbit.core.NodeImpl.internalRestore(NodeImpl.java:3799) at org.apache.jackrabbit.core.NodeImpl.internalRestore(NodeImpl.java:3760) at org.apache.jackrabbit.core.NodeImpl.restore(NodeImpl.java:3057) ... Line 3856 in NodeImpl.restoreFrozenState is: internalSetProperty(props[i].getName(), prop.getValues()[0]); This is always being called even for multivalued properties (the previous "if (prop.isMultiValued())" is always returning false). Even if I have a value in the multi-value property, only the first item is restored because the prop.isMultiValued() call in NodeImpl.restoreFrozenState() never returns true regardless of whether the property is multivalued or not. The node definition is: mix:lockable mix:versionable A new node is created with the primary type being "bob:customType" and an empty array of References is set as the value for that property in the node. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.