incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r486091 - in /incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl: ArrayDescriptor.java TypeRepository.java
Date Tue, 12 Dec 2006 11:01:35 GMT
Author: rickmcguire
Date: Tue Dec 12 03:01:34 2006
New Revision: 486091

URL: http://svn.apache.org/viewvc?view=rev&rev=486091
Log:
YOKO-242 RMI support not marshalling object arrays correctly.


Modified:
    incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
    incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java

Modified: incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java?view=diff&rev=486091&r1=486090&r2=486091
==============================================================================
--- incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
(original)
+++ incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
Tue Dec 12 03:01:34 2006
@@ -218,9 +218,10 @@
 
         logger.finer("writing " + getJavaClass().getName() + " size="
                 + arr.length);
+        org.omg.CORBA_2_3.portable.OutputStream _out = (org.omg.CORBA_2_3.portable.OutputStream)
out;
 
         for (int i = 0; i < arr.length; i++) {
-            javax.rmi.CORBA.Util.writeAny(out, arr[i]);
+            _out.write_value((java.io.Serializable)arr[i]);
         }
     }
 

Modified: incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java?view=diff&rev=486091&r1=486090&r2=486091
==============================================================================
--- incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
(original)
+++ incubator/yoko/trunk/rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java
Tue Dec 12 03:01:34 2006
@@ -333,6 +333,20 @@
         ValueDescriptor clzdesc = null;
 
         if (clz != null) {
+            ValueDescriptor desc = (ValueDescriptor)classMap.get(clz);
+            if (desc != null) {
+                return desc;
+            }
+            // special handling for array value types. 
+            if (clz.isArray()) {
+                desc = ArrayDescriptor.get(clz, this);
+                synchronized (desc) {
+                    classMap.put(clz, desc);
+                    desc.init();
+                    repidMap.put(desc.getRepositoryID(), desc);
+                }
+                return desc;
+            }
             clzdesc = (ValueDescriptor) getDescriptor(clz);
             String localID = clzdesc.getRepositoryID();
 
@@ -353,7 +367,7 @@
 
             }
 
-            logger.warning("mismatching repository ids. local: "
+            logger.fine("mismatching repository ids. local: "
                     + clzdesc.getRepositoryID() + "; remote: " + repid);
         }
 



Mime
View raw message