Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 59812 invoked from network); 17 May 2010 14:04:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 May 2010 14:04:50 -0000 Received: (qmail 36257 invoked by uid 500); 17 May 2010 14:04:50 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 36220 invoked by uid 500); 17 May 2010 14:04:50 -0000 Mailing-List: contact commits-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 commits@jackrabbit.apache.org Received: (qmail 36213 invoked by uid 99); 17 May 2010 14:04:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 14:04:50 +0000 X-ASF-Spam-Status: No, hits=-1500.7 required=10.0 tests=ALL_TRUSTED,AWL 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; Mon, 17 May 2010 14:04:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 130C6238897F; Mon, 17 May 2010 14:04:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r945166 - /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java Date: Mon, 17 May 2010 14:04:29 -0000 To: commits@jackrabbit.apache.org From: stefan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100517140429.130C6238897F@eris.apache.org> Author: stefan Date: Mon May 17 14:04:28 2010 New Revision: 945166 URL: http://svn.apache.org/viewvc?rev=945166&view=rev Log: make private inner-class static Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java?rev=945166&r1=945165&r2=945166&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java (original) +++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java Mon May 17 14:04:28 2010 @@ -210,10 +210,10 @@ public class PropertyState extends ItemS public QPropertyDefinition getDefinition() throws RepositoryException { if (definition == null) { /* - Don't pass 'all-nodetypes from parent': + Don't pass 'all-node types from parent': for NEW-states the definition is always set upon creation. for all other states the definition must be retrieved only taking - the effective nodetypes present on the parent into account + the effective node types present on the parent into account any kind of transiently added mixins must not have an effect on the definition retrieved for an state that has been persisted before. The effective NT must be evaluated as if it had been @@ -260,15 +260,15 @@ public class PropertyState extends ItemS void setValues(QValue[] values, int type) throws RepositoryException { if (getStatus() == Status.NEW) { if (data == null) { - data = new PropertyData(type, values); + data = new PropertyData(type, values, getDefinition()); } else { - data.setValues(type, values); + data.setValues(type, values, getDefinition()); } } else { if (transientData == null) { - transientData = new PropertyData(type, values); + transientData = new PropertyData(type, values, getDefinition()); } else { - transientData.setValues(type, values); + transientData.setValues(type, values, getDefinition()); } markModified(); } @@ -343,9 +343,9 @@ public class PropertyState extends ItemS //--------------------------------------------------------< inner class >--- /** - * Inner class storing property values an their type. + * Inner class storing property values and their type. */ - private class PropertyData { + private static class PropertyData { private int type; private QValue[] values; private boolean discarded; @@ -355,14 +355,14 @@ public class PropertyState extends ItemS this.values = pInfo.getValues(); } - private PropertyData(int type, QValue[] values) throws ConstraintViolationException, RepositoryException { - setValues(type, values); + private PropertyData(int type, QValue[] values, QPropertyDefinition definition) throws ConstraintViolationException, RepositoryException { + setValues(type, values, definition); } - private void setValues(int type, QValue[] values) throws ConstraintViolationException, RepositoryException { + private void setValues(int type, QValue[] values, QPropertyDefinition definition) throws ConstraintViolationException, RepositoryException { // make sure the arguments are consistent and do not violate the // given property definition. - validate(values, type, getDefinition()); + validate(values, type, definition); // free old values if existing discardValues(); @@ -387,7 +387,7 @@ public class PropertyState extends ItemS /** * Helper class for delayed determination of property differences. */ - private class PropertyDiffer implements MergeResult { + private static class PropertyDiffer implements MergeResult { private final PropertyData oldData; private final PropertyData newData;