jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r550493 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: ./ nodetype/ persistence/bundle/util/ persistence/db/ persistence/mem/ persistence/obj/ persistence/util/ persistence/xml/ query/lucene/ state/ value/ ...
Date Mon, 25 Jun 2007 13:28:23 GMT
Author: jukka
Date: Mon Jun 25 06:28:21 2007
New Revision: 550493

URL: http://svn.apache.org/viewvc?view=rev&rev=550493
Log:
JCR-926: Applied patch from Thomas Mueller to clean up the InternalValue class.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/Serializer.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextExtractorFilter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextFilterExtractor.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/BatchedItemOperations.java Mon Jun 25 06:28:21 2007
@@ -331,7 +331,7 @@
             InternalValue[] newVals = new InternalValue[values.length];
             for (int i = 0; i < values.length; i++) {
                 InternalValue val = values[i];
-                UUID original = (UUID) val.internalValue();
+                UUID original = val.getUUID();
                 UUID adjusted = refTracker.getMappedUUID(original);
                 if (adjusted != null) {
                     newVals[i] = InternalValue.create(adjusted);
@@ -1314,7 +1314,7 @@
             log.debug(msg);
             throw new RepositoryException(msg, ise);
         }
-        boolean checkedOut = ((Boolean) propState.getValues()[0].internalValue()).booleanValue();
+        boolean checkedOut = propState.getValues()[0].getBoolean();
         if (!checkedOut) {
             throw new VersionException(safeGetJCRPath(nodePath) + " is checked-in");
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ItemImpl.java Mon Jun 25 06:28:21 2007
@@ -587,7 +587,7 @@
                                 boolean satisfied = false;
                                 String constraintViolationMsg = null;
                                 try {
-                                    UUID targetUUID = (UUID) values[i].internalValue();
+                                    UUID targetUUID = values[i].getUUID();
                                     Node targetNode = session.getNodeByUUID(targetUUID);
                                     /**
                                      * constraints are OR-ed, i.e. at least one

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java Mon Jun 25 06:28:21 2007
@@ -21,11 +21,8 @@
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.value.InternalValue;
-import org.apache.jackrabbit.name.NoPrefixDeclaredException;
 import org.apache.jackrabbit.name.Path;
 import org.apache.jackrabbit.name.QName;
-import org.apache.jackrabbit.name.PathFormat;
-import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.uuid.UUID;
 import org.apache.jackrabbit.value.BooleanValue;
 import org.apache.jackrabbit.value.DateValue;
@@ -163,6 +160,7 @@
      * @see javax.jcr.Property#getLengths()
      */
     protected long getLength(InternalValue value) throws RepositoryException {
+        // TODO maybe move method to InternalValue
         switch (value.getType()) {
             case PropertyType.STRING:
             case PropertyType.LONG:
@@ -170,15 +168,15 @@
                 return value.toString().length();
 
             case PropertyType.NAME:
-                QName name = (QName) value.internalValue();
+                QName name = value.getQName();
                 return session.getJCRName(name).length();
 
             case PropertyType.PATH:
-                Path path = (Path) value.internalValue();
+                Path path = value.getPath();
                 return session.getJCRPath(path).length();
 
             case PropertyType.BINARY:
-                BLOBFileValue blob = (BLOBFileValue) value.internalValue();
+                BLOBFileValue blob = value.getBLOBFileValue();
                 return blob.getLength();
 
             default:
@@ -276,7 +274,7 @@
                 if (old != null && old.getType() == PropertyType.BINARY) {
                     // make sure temporarily allocated data is discarded
                     // before overwriting it
-                    ((BLOBFileValue) old.internalValue()).discard();
+                    old.getBLOBFileValue().discard();
                 }
             }
         }
@@ -541,7 +539,7 @@
         InternalValue val = state.getValues()[0];
         int type = val.getType();
         if (type == PropertyType.LONG) {
-            return ((Long) val.internalValue()).longValue();
+            return val.getLong();
         }
         // not a LONG value, delegate conversion to Value object
         return val.toJCRValue(session.getNamespaceResolver()).getLong();
@@ -565,7 +563,7 @@
         InternalValue val = state.getValues()[0];
         int type = val.getType();
         if (type == PropertyType.DOUBLE) {
-            return ((Double) val.internalValue()).doubleValue();
+            return val.getDouble();
         }
         // not a DOUBLE value, delegate conversion to Value object
         return val.toJCRValue(session.getNamespaceResolver()).getDouble();
@@ -589,7 +587,7 @@
         InternalValue val = state.getValues()[0];
         int type = val.getType();
         if (type == PropertyType.DATE) {
-            return (Calendar) val.internalValue();
+            return val.getDate();
         }
         // not a DATE value, delegate conversion to Value object
         return val.toJCRValue(session.getNamespaceResolver()).getDate();
@@ -613,7 +611,7 @@
         InternalValue val = state.getValues()[0];
         int type = val.getType();
         if (type == PropertyType.BOOLEAN) {
-            return ((Boolean) val.internalValue()).booleanValue();
+            return val.getBoolean();
         }
         // not a BOOLEAN value, delegate conversion to Value object
         return val.toJCRValue(session.getNamespaceResolver()).getBoolean();
@@ -636,7 +634,7 @@
         InternalValue val = state.getValues()[0];
         if (val.getType() == PropertyType.REFERENCE) {
             // reference, i.e. target UUID
-            UUID targetUUID = (UUID) val.internalValue();
+            UUID targetUUID = val.getUUID();
             return (Node) itemMgr.getItem(new NodeId(targetUUID));
         } else {
             throw new ValueFormatException("property must be of type REFERENCE");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java Mon Jun 25 06:28:21 2007
@@ -158,14 +158,6 @@
         }
     }
 
-    void check(Boolean bool) throws ConstraintViolationException {
-        if (bool == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '"
-                    + definition + "'");
-        }
-        check(bool.booleanValue());
-    }
-
     void check(boolean bool) throws ConstraintViolationException {
         if (bool != reqBool) {
             throw new ConstraintViolationException("'" + bool
@@ -180,7 +172,7 @@
         }
         switch (value.getType()) {
             case PropertyType.BOOLEAN:
-                check((Boolean) value.internalValue());
+                check(value.getBoolean());
                 return;
 
             default:
@@ -307,22 +299,6 @@
         }
     }
 
-    void check(Double number) throws ConstraintViolationException {
-        if (number == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '"
-                    + definition + "'");
-        }
-        check(number.doubleValue());
-    }
-
-    void check(Long number) throws ConstraintViolationException {
-        if (number == null) {
-            throw new ConstraintViolationException("null value does not satisfy the constraint '"
-                    + definition + "'");
-        }
-        check(number.doubleValue());
-    }
-
     void check(double number) throws ConstraintViolationException {
         if (lowerLimit != null) {
             if (lowerInclusive) {
@@ -363,15 +339,15 @@
         }
         switch (value.getType()) {
             case PropertyType.LONG:
-                check((Long) value.internalValue());
+                check(value.getLong());
                 return;
 
             case PropertyType.DOUBLE:
-                check((Double) value.internalValue());
+                check(value.getDouble());
                 return;
 
             case PropertyType.BINARY:
-                BLOBFileValue blob = (BLOBFileValue) value.internalValue();
+                BLOBFileValue blob = value.getBLOBFileValue();
                 long length = blob.getLength();
                 if (length != -1) {
                     check(length);
@@ -504,7 +480,7 @@
         }
         switch (value.getType()) {
             case PropertyType.DATE:
-                check((Calendar) value.internalValue());
+                check(value.getDate());
                 return;
 
             default:
@@ -566,7 +542,7 @@
         }
         switch (value.getType()) {
             case PropertyType.PATH:
-                Path p = (Path) value.internalValue();
+                Path p = value.getPath();
                 // normalize paths before comparing them
                 Path p0, p1;
                 try {
@@ -645,7 +621,7 @@
         }
         switch (value.getType()) {
             case PropertyType.NAME:
-                QName n = (QName) value.internalValue();
+                QName n = value.getQName();
                 if (!name.equals(n)) {
                     throw new ConstraintViolationException(n
                             + " does not satisfy the constraint '"

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java Mon Jun 25 06:28:21 2007
@@ -549,7 +549,7 @@
                 case PropertyType.BINARY:
                     // special handling required for binary value:
                     // spool binary value to file in blob store
-                    BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                    BLOBFileValue blobVal = val.getBLOBFileValue();
                     long size = blobVal.getLength();
                     if (size < 0) {
                         log.warn("Blob has negative size. Potential loss of data. " +
@@ -633,19 +633,19 @@
                     }
                     break;
                 case PropertyType.DOUBLE:
-                    out.writeDouble(((Double) val.internalValue()).doubleValue());
+                    out.writeDouble(val.getDouble());
                     break;
                 case PropertyType.LONG:
-                    out.writeLong(((Long) val.internalValue()).longValue());
+                    out.writeLong(val.getLong());
                     break;
                 case PropertyType.BOOLEAN:
-                    out.writeBoolean(((Boolean) val.internalValue()).booleanValue());
+                    out.writeBoolean(val.getBoolean());
                     break;
                 case PropertyType.NAME:
-                    writeQName(out, (QName) val.internalValue());
+                    writeQName(out, val.getQName());
                     break;
                 case PropertyType.REFERENCE:
-                    writeUUID(out, (UUID) val.internalValue());
+                    writeUUID(out, val.getUUID());
                     break;
                 default:
                     // because writeUTF(String) has a size limit of 64k,

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java Mon Jun 25 06:28:21 2007
@@ -377,7 +377,7 @@
                     try {
                         // special handling required for binary value:
                         // spool binary value to file in blob store
-                        BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                        BLOBFileValue blobVal = val.getBLOBFileValue();
                         long size = blobVal.getLength();
                         if (size > minBlobSize) {
                             out.writeInt(-1);
@@ -436,19 +436,19 @@
                     }
                     break;
                 case PropertyType.DOUBLE:
-                    out.writeDouble(((Double) val.internalValue()).doubleValue());
+                    out.writeDouble(val.getDouble());
                     break;
                 case PropertyType.LONG:
-                    out.writeLong(((Long) val.internalValue()).longValue());
+                    out.writeLong(val.getLong());
                     break;
                 case PropertyType.BOOLEAN:
-                    out.writeBoolean(((Boolean) val.internalValue()).booleanValue());
+                    out.writeBoolean(val.getBoolean());
                     break;
                 case PropertyType.NAME:
-                    writeQName(out, (QName) val.internalValue());
+                    writeQName(out, val.getQName());
                     break;
                 case PropertyType.REFERENCE:
-                    writeUUID(out, (UUID) val.internalValue());
+                    writeUUID(out, val.getUUID());
                     break;
                 default:
                     // because writeUTF(String) has a size limit of 64k,

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java Mon Jun 25 06:28:21 2007
@@ -29,7 +29,6 @@
 import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
 import org.apache.jackrabbit.core.value.InternalValue;
-import org.apache.jackrabbit.core.value.BLOBFileValue;
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.nodetype.NodeDefId;
@@ -683,9 +682,7 @@
             if (type == PropertyType.BINARY) {
                 // destroy binary property values
                 for (int i=0; i<values.length; i++) {
-                    if (values[i].internalValue() instanceof BLOBFileValue) {
-                        ((BLOBFileValue) values[i].internalValue()).delete(true);
-                    }
+                    values[i].getBLOBFileValue().delete(true);
                 }
             }
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/DatabasePersistenceManager.java Mon Jun 25 06:28:21 2007
@@ -510,7 +510,7 @@
                 InternalValue val = values[i];
                 if (val != null) {
                     if (val.getType() == PropertyType.BINARY) {
-                        BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                        BLOBFileValue blobVal = val.getBLOBFileValue();
                         // delete internal resource representation of BLOB value
                         blobVal.delete(true);
                         // also remove from BLOBStore

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/mem/InMemPersistenceManager.java Mon Jun 25 06:28:21 2007
@@ -489,7 +489,7 @@
                 InternalValue val = values[i];
                 if (val != null) {
                     if (val.getType() == PropertyType.BINARY) {
-                        BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                        BLOBFileValue blobVal = val.getBLOBFileValue();
                         // delete blob file and prune empty parent folders
                         blobVal.delete(true);
                     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/obj/ObjectPersistenceManager.java Mon Jun 25 06:28:21 2007
@@ -411,7 +411,7 @@
                 InternalValue val = values[i];
                 if (val != null) {
                     if (val.getType() == PropertyType.BINARY) {
-                        BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                        BLOBFileValue blobVal = val.getBLOBFileValue();
                         // delete blob file and prune empty parent folders
                         blobVal.delete(true);
                     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/Serializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/Serializer.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/Serializer.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/Serializer.java Mon Jun 25 06:28:21 2007
@@ -193,7 +193,7 @@
             if (state.getType() == PropertyType.BINARY) {
                 // special handling required for binary value:
                 // put binary value in BLOB store
-                BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                BLOBFileValue blobVal = val.getBLOBFileValue();
                 InputStream in = blobVal.getStream();
                 String blobId = blobStore.createId(state.getPropertyId(), i);
                 try {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java Mon Jun 25 06:28:21 2007
@@ -667,7 +667,7 @@
                             if (type == PropertyType.BINARY) {
                                 // special handling required for binary value:
                                 // put binary value in BLOB store
-                                BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                                BLOBFileValue blobVal = val.getBLOBFileValue();
                                 InputStream in = blobVal.getStream();
                                 String blobId = blobStore.createId(state.getPropertyId(), i);
                                 try {
@@ -760,7 +760,7 @@
                 InternalValue val = values[i];
                 if (val != null) {
                     if (val.getType() == PropertyType.BINARY) {
-                        BLOBFileValue blobVal = (BLOBFileValue) val.internalValue();
+                        BLOBFileValue blobVal = val.getBLOBFileValue();
                         // delete blob file and prune empty parent folders
                         blobVal.delete(true);
                     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/NodeIndexer.java Mon Jun 25 06:28:21 2007
@@ -31,6 +31,7 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.name.PathFormat;
+import org.apache.jackrabbit.uuid.UUID;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.apache.lucene.document.Document;
@@ -248,51 +249,50 @@
         } catch (NoPrefixDeclaredException e) {
             // will never happen
         }
-        Object internalValue = value.internalValue();
         switch (value.getType()) {
             case PropertyType.BINARY:
                 if (isIndexed(name)) {
-                    addBinaryValue(doc, fieldName, internalValue);
+                    addBinaryValue(doc, fieldName, value.getBLOBFileValue());
                 }
                 break;
             case PropertyType.BOOLEAN:
                 if (isIndexed(name)) {
-                    addBooleanValue(doc, fieldName, internalValue);
+                    addBooleanValue(doc, fieldName, Boolean.valueOf(value.getBoolean()));
                 }
                 break;
             case PropertyType.DATE:
                 if (isIndexed(name)) {
-                    addCalendarValue(doc, fieldName, internalValue);
+                    addCalendarValue(doc, fieldName, value.getDate());
                 }
                 break;
             case PropertyType.DOUBLE:
                 if (isIndexed(name)) {
-                    addDoubleValue(doc, fieldName, internalValue);
+                    addDoubleValue(doc, fieldName, new Double(value.getDouble()));
                 }
                 break;
             case PropertyType.LONG:
                 if (isIndexed(name)) {
-                    addLongValue(doc, fieldName, internalValue);
+                    addLongValue(doc, fieldName, new Long(value.getLong()));
                 }
                 break;
             case PropertyType.REFERENCE:
                 if (isIndexed(name)) {
-                    addReferenceValue(doc, fieldName, internalValue);
+                    addReferenceValue(doc, fieldName, value.getUUID());
                 }
                 break;
             case PropertyType.PATH:
                 if (isIndexed(name)) {
-                    addPathValue(doc, fieldName, internalValue);
+                    addPathValue(doc, fieldName, value.getPath());
                 }
                 break;
             case PropertyType.STRING:
                 if (isIndexed(name)) {
                     // never fulltext index jcr:uuid String
                     if (name.equals(QName.JCR_UUID)) {
-                        addStringValue(doc, fieldName, internalValue,
+                        addStringValue(doc, fieldName, value.getString(),
                                 false, false, DEFAULT_BOOST);
                     } else {
-                        addStringValue(doc, fieldName, internalValue,
+                        addStringValue(doc, fieldName, value.getString(),
                                 true, isIncludedInNodeIndex(name),
                                 getPropertyBoost(name));
                     }
@@ -304,7 +304,7 @@
                 if (isIndexed(name) ||
                         name.equals(QName.JCR_PRIMARYTYPE) ||
                         name.equals(QName.JCR_MIXINTYPES)) {
-                    addNameValue(doc, fieldName, internalValue);
+                    addNameValue(doc, fieldName, value.getQName());
                 }
                 break;
             default:
@@ -336,13 +336,13 @@
 
             InternalValue typeValue = getValue(QName.JCR_MIMETYPE);
             if (typeValue != null) {
-                String type = typeValue.internalValue().toString();
+                String type = typeValue.getString();
 
                 // jcr:encoding is not mandatory
                 String encoding = null;
                 InternalValue encodingValue = getValue(QName.JCR_ENCODING);
                 if (encodingValue != null) {
-                    encoding = encodingValue.internalValue().toString();
+                    encoding = encodingValue.getString();
                 }
 
                 InputStream stream =
@@ -408,7 +408,8 @@
      * @param internalValue The value for the field to add to the document.
      */
     protected void addCalendarValue(Document doc, String fieldName, Object internalValue) {
-        long millis = ((Calendar) internalValue).getTimeInMillis();
+        Calendar value = (Calendar) internalValue;
+        long millis = value.getTimeInMillis();
         doc.add(new Field(FieldNames.PROPERTIES,
                 FieldNames.createNamedValue(fieldName, DateField.timeToString(millis)),
                 Field.Store.NO,
@@ -462,7 +463,8 @@
      * @param internalValue The value for the field to add to the document.
      */
     protected void addReferenceValue(Document doc, String fieldName, Object internalValue) {
-        String uuid = internalValue.toString();
+        UUID value = (UUID) internalValue;
+        String uuid = value.toString();
         doc.add(new Field(FieldNames.PROPERTIES,
                 FieldNames.createNamedValue(fieldName, uuid),
                 Field.Store.YES, // store
@@ -543,9 +545,9 @@
     protected void addStringValue(Document doc, String fieldName,
                                   Object internalValue, boolean tokenized,
                                   boolean includeInNodeIndex, float boost) {
-        String stringValue = String.valueOf(internalValue);
 
         // simple String
+        String stringValue = (String) internalValue;
         doc.add(new Field(FieldNames.PROPERTIES,
                 FieldNames.createNamedValue(fieldName, stringValue),
                 Field.Store.NO,
@@ -585,7 +587,7 @@
      */
     protected void addNameValue(Document doc, String fieldName, Object internalValue) {
         QName qualiName = (QName) internalValue;
-        String normValue = internalValue.toString();
+        String normValue = qualiName.toString();
         try {
             normValue = mappings.getPrefix(qualiName.getNamespaceURI())
                     + ":" + qualiName.getLocalName();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextExtractorFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextExtractorFilter.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextExtractorFilter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextExtractorFilter.java Mon Jun 25 06:28:21 2007
@@ -100,7 +100,7 @@
                     type = types[0];
                 }
 
-                BLOBFileValue blob = (BLOBFileValue) values[0].internalValue();
+                BLOBFileValue blob = values[0].getBLOBFileValue();
                 Reader reader =
                     extractor.extractText(blob.getStream(), type, encoding);
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextFilterExtractor.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextFilterExtractor.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextFilterExtractor.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/TextFilterExtractor.java Mon Jun 25 06:28:21 2007
@@ -108,15 +108,15 @@
                 return new FilterReader((Reader) fulltext) {
                     public void close() throws IOException {
                         super.close();
-                        ((BLOBFileValue) value.internalValue()).discard();
+                        value.getBLOBFileValue().discard();
                     }
                 };
             } else {
-                ((BLOBFileValue) value.internalValue()).discard();
+                value.getBLOBFileValue().discard();
                 return new StringReader("");
             }
         } catch (RepositoryException e) {
-            ((BLOBFileValue) value.internalValue()).discard();
+            value.getBLOBFileValue().discard();
             return new StringReader("");
         }
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java Mon Jun 25 06:28:21 2007
@@ -263,7 +263,7 @@
                 try {
                     if (type == PropertyType.BINARY) {
                         // special handling required for binary value
-                        BLOBFileValue blob = (BLOBFileValue) val.internalValue();
+                        BLOBFileValue blob = val.getBLOBFileValue();
                         InputStream in = blob.getStream();
                         out.writeLong(blob.getLength());
                         byte[] buf = new byte[0x2000];

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java Mon Jun 25 06:28:21 2007
@@ -1230,7 +1230,7 @@
                     InternalValue[] vals = prop.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
                         NodeReferencesId refsId = new NodeReferencesId(
-                                (UUID) vals[i].internalValue());
+                                vals[i].getUUID());
                         if (virtualProvider != null
                                 && virtualProvider.hasNodeReferences(refsId)) {
                             continue;
@@ -1260,7 +1260,7 @@
                     InternalValue[] vals = oldProp.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
                         NodeReferencesId refsId = new NodeReferencesId(
-                                (UUID) vals[i].internalValue());
+                                vals[i].getUUID());
                         if (virtualProvider != null
                                 && virtualProvider.hasNodeReferences(refsId)) {
                             continue;
@@ -1284,7 +1284,7 @@
                     InternalValue[] vals = newProp.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
                         NodeReferencesId refsId = new NodeReferencesId(
-                                (UUID) vals[i].internalValue());
+                                vals[i].getUUID());
                         if (virtualProvider != null
                                 && virtualProvider.hasNodeReferences(refsId)) {
                             continue;
@@ -1311,7 +1311,7 @@
                     InternalValue[] vals = prop.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
                         NodeReferencesId refsId = new NodeReferencesId(
-                                (UUID) vals[i].internalValue());
+                                vals[i].getUUID());
                         if (virtualProvider != null
                                 && virtualProvider.hasNodeReferences(refsId)) {
                             continue;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/XAItemStateManager.java Mon Jun 25 06:28:21 2007
@@ -330,7 +330,7 @@
                 if (prop.getType() == PropertyType.REFERENCE) {
                     InternalValue[] vals = prop.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
-                        UUID uuid = (UUID) vals[i].internalValue();
+                        UUID uuid = vals[i].getUUID();
                         NodeReferencesId refsId = new NodeReferencesId(uuid);
                         addVirtualReference(prop.getPropertyId(), refsId);
                     }
@@ -346,7 +346,7 @@
                 if (oldProp.getType() == PropertyType.REFERENCE) {
                     InternalValue[] vals = oldProp.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
-                        UUID uuid = (UUID) vals[i].internalValue();
+                        UUID uuid = vals[i].getUUID();
                         NodeReferencesId refsId = new NodeReferencesId(uuid);
                         removeVirtualReference(oldProp.getPropertyId(), refsId);
                     }
@@ -354,7 +354,7 @@
                 if (newProp.getType() == PropertyType.REFERENCE) {
                     InternalValue[] vals = newProp.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
-                        UUID uuid = (UUID) vals[i].internalValue();
+                        UUID uuid = vals[i].getUUID();
                         NodeReferencesId refsId = new NodeReferencesId(uuid);
                         addVirtualReference(newProp.getPropertyId(), refsId);
                     }
@@ -368,7 +368,7 @@
                 if (prop.getType() == PropertyType.REFERENCE) {
                     InternalValue[] vals = prop.getValues();
                     for (int i = 0; vals != null && i < vals.length; i++) {
-                        UUID uuid = (UUID) vals[i].internalValue();
+                        UUID uuid = vals[i].getUUID();
                         NodeReferencesId refsId = new NodeReferencesId(uuid);
                         removeVirtualReference(prop.getPropertyId(), refsId);
                     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java Mon Jun 25 06:28:21 2007
@@ -324,11 +324,57 @@
     }
 
     /**
+     * @deprecated
      * @return the internal object
      */
     public Object internalValue() {
         return val;
     }
+    
+    public BLOBFileValue getBLOBFileValue() {
+        assert val != null && type == PropertyType.BINARY;
+        return (BLOBFileValue) val;
+    }
+    
+    public UUID getUUID() {
+        assert val != null && type == PropertyType.REFERENCE;
+        return (UUID) val;
+    }
+    
+    public boolean getBoolean() {
+        assert val != null && type == PropertyType.BOOLEAN;
+        return ((Boolean) val).booleanValue();
+    }    
+
+    public QName getQName() {
+        assert val != null && type == PropertyType.NAME;
+        return (QName) val;
+    }
+    
+    public Path getPath() {
+        assert val != null && type == PropertyType.PATH;
+        return (Path) val;
+    }
+    
+    public long getLong() {
+        assert val != null && type == PropertyType.LONG;
+        return ((Long) val).longValue();
+    }
+    
+    public double getDouble() {
+        assert val != null && type == PropertyType.DOUBLE;
+        return ((Double) val).doubleValue();
+    }
+    
+    public Calendar getDate() {
+        assert val != null && type == PropertyType.DATE;
+        return (Calendar) val;
+    }
+    
+    public String getString() {
+        assert val != null && type == PropertyType.STRING;
+        return (String) val;
+    }    
 
     /**
      * @return the type

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java Mon Jun 25 06:28:21 2007
@@ -109,10 +109,10 @@
             PropertyState prop = props[i];
             if (prop.getName().equals(QName.JCR_FROZENUUID)) {
                 // special property
-                frozenUUID = UUID.fromString(node.getPropertyValue(QName.JCR_FROZENUUID).internalValue().toString());
+                frozenUUID = UUID.fromString(node.getPropertyValue(QName.JCR_FROZENUUID).getString());
             } else if (prop.getName().equals(QName.JCR_FROZENPRIMARYTYPE)) {
                 // special property
-                frozenPrimaryType = (QName) node.getPropertyValue(QName.JCR_FROZENPRIMARYTYPE).internalValue();
+                frozenPrimaryType = node.getPropertyValue(QName.JCR_FROZENPRIMARYTYPE).getQName();
             } else if (prop.getName().equals(QName.JCR_FROZENMIXINTYPES)) {
                 // special property
                 InternalValue[] values = node.getPropertyValues(QName.JCR_FROZENMIXINTYPES);
@@ -121,7 +121,7 @@
                 } else {
                     frozenMixinTypes = new QName[values.length];
                     for (int j = 0; j < values.length; j++) {
-                        frozenMixinTypes[j] = (QName) values[j].internalValue();
+                        frozenMixinTypes[j] = values[j].getQName();
                     }
                 }
             } else if (prop.getName().equals(QName.JCR_PRIMARYTYPE)) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenVHImpl.java Mon Jun 25 06:28:21 2007
@@ -58,8 +58,7 @@
      * {@inheritDoc}
      */
     public NodeId getVersionHistoryId() {
-        return new NodeId((UUID)
-                node.getPropertyValue(QName.JCR_CHILDVERSIONHISTORY).internalValue());
+        return new NodeId(node.getPropertyValue(QName.JCR_CHILDVERSIONHISTORY).getUUID());
     }
 
     /**
@@ -78,8 +77,7 @@
      * {@inheritDoc}
      */
     public NodeId getBaseVersionId() {
-        return new NodeId((UUID)
-                node.getPropertyValue(QName.JCR_BASEVERSION).internalValue());
+        return new NodeId(node.getPropertyValue(QName.JCR_BASEVERSION).getUUID());
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java Mon Jun 25 06:28:21 2007
@@ -145,7 +145,7 @@
                 PropertyState pState = labels[i];
                 if (pState.getType() == PropertyType.REFERENCE) {
                     QName name = pState.getName();
-                    UUID ref = (UUID) pState.getValues()[0].internalValue();
+                    UUID ref = pState.getValues()[0].getUUID();
                     InternalVersionImpl v = (InternalVersionImpl) getVersion(new NodeId(ref));
                     if (v != null) {
                         labelCache.put(name, v);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java Mon Jun 25 06:28:21 2007
@@ -76,7 +76,7 @@
         // init internal values
         InternalValue[] values = node.getPropertyValues(QName.JCR_CREATED);
         if (values != null) {
-            created = (Calendar) values[0].internalValue();
+            created = values[0].getDate();
         }
         isRoot = name.equals(QName.JCR_ROOTVERSION);
     }
@@ -135,7 +135,7 @@
             if (values != null) {
                 InternalVersion[] versions = new InternalVersion[values.length];
                 for (int i = 0; i < values.length; i++) {
-                    NodeId vId = new NodeId((UUID) values[i].internalValue());
+                    NodeId vId = new NodeId(values[i].getUUID());
                     versions[i] = versionHistory.getVersion(vId);
                 }
                 return versions;
@@ -155,7 +155,7 @@
         if (values != null) {
             InternalVersion[] versions = new InternalVersion[values.length];
             for (int i = 0; i < values.length; i++) {
-                NodeId vId = new NodeId((UUID) values[i].internalValue());
+                NodeId vId = new NodeId(values[i].getUUID());
                 versions[i] = versionHistory.getVersion(vId);
             }
             return versions;
@@ -390,7 +390,7 @@
         InternalValue[] values = node.getPropertyValues(QName.JCR_PREDECESSORS);
         if (values != null) {
             for (int i = 0; i < values.length; i++) {
-                NodeId vId = new NodeId((UUID) values[i].internalValue());
+                NodeId vId = new NodeId(values[i].getUUID());
                 InternalVersionImpl v = (InternalVersionImpl) versionHistory.getVersion(vId);
                 v.internalAddSuccessor(this, false);
             }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?view=diff&rev=550493&r1=550492&r2=550493
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java Mon Jun 25 06:28:21 2007
@@ -588,7 +588,7 @@
                 InternalValue[] newVals = new InternalValue[values.length];
                 for (int i = 0; i < values.length; i++) {
                     InternalValue val = values[i];
-                    UUID original = (UUID) val.internalValue();
+                    UUID original = val.getUUID();
                     UUID adjusted = refTracker.getMappedUUID(original);
                     if (adjusted != null) {
                         newVals[i] = InternalValue.create(adjusted);



Mime
View raw message