[exo-jcr-commits] exo-jcr SVN: r818 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Nov 24 03:57:13 EST 2009
Author: sergiykarpenko
Date: 2009-11-24 03:57:13 -0500 (Tue, 24 Nov 2009)
New Revision: 818
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
Log:
EXOJCR-246: JBossCacheStorageConnection exception throwing updated
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-24 08:44:16 UTC (rev 817)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-24 08:57:13 UTC (rev 818)
@@ -309,10 +309,16 @@
Fqn<String> propUUID = makePropFqn(data.getIdentifier());
Node<Serializable, Object> prop = propsRoot.getChild(propUUID);
+ if (prop == null)
+ {
+ throw new InvalidItemStateException("Property doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
+ }
PropertyData prevData = (PropertyData)prop.get(ITEM_DATA);
if (prevData == null)
{
- throw new RepositoryException("FATAL PropertyData already empty " + data.getQPath().getAsString());
+ throw new InvalidItemStateException("FATAL. Property record exist but PropertyData already empty "
+ + data.getQPath().getAsString());
}
// REFERENCEs handling
@@ -851,7 +857,7 @@
Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
if (parent == null)
{
- throw new RepositoryException("FATAL Node's parent not found " + data.getQPath().getAsString());
+ throw new InvalidItemStateException("FATAL Node's parent not found " + data.getQPath().getAsString());
}
// update child on Parent
@@ -1163,7 +1169,7 @@
if (!refParent.removeChild(propId))
{
- throw new RepositoryException("FATAL Reference property was not removed from REFS table of node "
+ throw new InvalidItemStateException("Reference property was not removed from REFS table of node "
+ nodeId);
}
@@ -1171,7 +1177,7 @@
{
if (!refsRoot.removeChild(makeNodeFqn(nodeId)))
{
- throw new RepositoryException("FATAL Node record was node removed from REFS table " + nodeId);
+ throw new InvalidItemStateException("Node record was node removed from REFS table " + nodeId);
}
}
}
More information about the exo-jcr-commits
mailing list