jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r813890 - in /jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: NodeImpl.java PropertyImpl.java
Date Fri, 11 Sep 2009 16:00:38 GMT
Author: mreutegg
Date: Fri Sep 11 16:00:37 2009
New Revision: 813890

URL: http://svn.apache.org/viewvc?rev=813890&view=rev
Log:
JCR-2170: Remove PropDefId and NodeDefId
- remove unnecessary call to getDefinition()
- make sure all mixin types are available

Modified:
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
    jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java?rev=813890&r1=813889&r2=813890&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/NodeImpl.java
Fri Sep 11 16:00:37 2009
@@ -143,6 +143,23 @@
                     + state.getNodeTypeName() + "' of " + this);
             data.getNodeState().setNodeTypeName(NameConstants.NT_UNSTRUCTURED);
         }
+        List<Name> unknown = null;
+        for (Name mixinName : state.getMixinTypeNames()) {
+            if (!ntReg.isRegistered(mixinName)) {
+                if (unknown == null) {
+                    unknown = new ArrayList<Name>();
+                }
+                unknown.add(mixinName);
+                log.warn("Ignoring unknown mixin type '" + mixinName +
+                        "' of " + this);
+            }
+        }
+        if (unknown != null) {
+            // ignore unknown mixin type names
+            Set<Name> known = new HashSet<Name>(state.getMixinTypeNames());
+            known.removeAll(unknown);
+            state.setMixinTypeNames(known);
+        }
     }
 
     /**

Modified: jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?rev=813890&r1=813889&r2=813890&view=diff
==============================================================================
--- jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
(original)
+++ jackrabbit/sandbox/JCR-2170/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java
Fri Sep 11 16:00:37 2009
@@ -426,7 +426,6 @@
      * @throws RepositoryException
      */
     public InternalValue internalGetValue() throws RepositoryException {
-        final PropertyDefinition definition = data.getPropertyDefinition();
         if (isMultiple()) {
             throw new ValueFormatException(
                     this + " is a multi-valued property,"



Mime
View raw message