jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r178638 - in /incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi: client/ClientItemDefinition.java client/ClientNodeDefinition.java server/ServerItemDefinition.java server/ServerNodeDefinition.java
Date Thu, 26 May 2005 14:26:40 GMT
Author: tripod
Date: Thu May 26 07:26:39 2005
New Revision: 178638

URL: http://svn.apache.org/viewcvs?rev=178638&view=rev
Log:
- fixing serialization problems when defaultPrimaryType or declaring (for root node) is NULL

Modified:
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
    incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java?rev=178638&r1=178637&r2=178638&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientItemDefinition.java
Thu May 26 07:26:39 2005
@@ -22,6 +22,7 @@
 import javax.jcr.nodetype.NodeType;
 
 import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
 
 /**
  * Local adapter for the JCR-RMI
@@ -56,7 +57,12 @@
     /** {@inheritDoc} */
     public NodeType getDeclaringNodeType() {
         try {
-            return getFactory().getNodeType(remote.getDeclaringNodeType());
+            RemoteNodeType nt = remote.getDeclaringNodeType();
+            if (nt == null) {
+                return null;
+            } else {
+                return getFactory().getNodeType(nt);
+            }
         } catch (RemoteException ex) {
             throw new RemoteRuntimeException(ex);
         }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java?rev=178638&r1=178637&r2=178638&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/ClientNodeDefinition.java
Thu May 26 07:26:39 2005
@@ -22,6 +22,7 @@
 import javax.jcr.nodetype.NodeType;
 
 import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
+import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
 
 /**
  * Local adapter for the JCR-RMI
@@ -61,7 +62,12 @@
     /** {@inheritDoc} */
     public NodeType getDefaultPrimaryType() {
         try {
-            return getFactory().getNodeType(remote.getDefaultPrimaryType());
+            RemoteNodeType nt = remote.getDefaultPrimaryType();
+            if (nt == null) {
+                return null;
+            } else {
+                return getFactory().getNodeType(nt);
+            }
         } catch (RemoteException ex) {
             throw new RemoteRuntimeException(ex);
         }

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java?rev=178638&r1=178637&r2=178638&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerItemDefinition.java
Thu May 26 07:26:39 2005
@@ -19,6 +19,7 @@
 import java.rmi.RemoteException;
 
 import javax.jcr.nodetype.ItemDefinition;
+import javax.jcr.nodetype.NodeType;
 
 import org.apache.jackrabbit.rmi.remote.RemoteItemDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
@@ -58,7 +59,12 @@
 
     /** {@inheritDoc} */
     public RemoteNodeType getDeclaringNodeType() throws RemoteException {
-        return getFactory().getRemoteNodeType(def.getDeclaringNodeType());
+        NodeType nt = def.getDeclaringNodeType();
+        if (nt == null) {
+            return null;
+        } else {
+            return getFactory().getRemoteNodeType(nt);
+        }
     }
 
     /** {@inheritDoc} */

Modified: incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java?rev=178638&r1=178637&r2=178638&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
(original)
+++ incubator/jackrabbit/trunk/contrib/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/ServerNodeDefinition.java
Thu May 26 07:26:39 2005
@@ -19,6 +19,7 @@
 import java.rmi.RemoteException;
 
 import javax.jcr.nodetype.NodeDefinition;
+import javax.jcr.nodetype.NodeType;
 
 import org.apache.jackrabbit.rmi.remote.RemoteNodeDefinition;
 import org.apache.jackrabbit.rmi.remote.RemoteNodeType;
@@ -59,7 +60,12 @@
 
     /** {@inheritDoc} */
     public RemoteNodeType getDefaultPrimaryType() throws RemoteException {
-        return getFactory().getRemoteNodeType(def.getDefaultPrimaryType());
+        NodeType nt = def.getDefaultPrimaryType();
+        if (nt == null) {
+            return null;
+        } else {
+            return getFactory().getRemoteNodeType(def.getDefaultPrimaryType());
+        }
     }
 
     /** {@inheritDoc} */



Mime
View raw message