geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1156250 - /geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
Date Wed, 10 Aug 2011 16:20:36 GMT
Author: djencks
Date: Wed Aug 10 16:20:36 2011
New Revision: 1156250

URL: http://svn.apache.org/viewvc?rev=1156250&view=rev
Log:
YOKO-435 create type code from java class more correctly, especially for array classes

Modified:
    geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java

Modified: geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java?rev=1156250&r1=1156249&r2=1156250&view=diff
==============================================================================
--- geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
(original)
+++ geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
Wed Aug 10 16:20:36 2011
@@ -955,9 +955,17 @@ public class ValueDescriptor extends Typ
         org.omg.CORBA.TypeCode _base = (_super_descriptor == null ? null
                 : _super_descriptor.getTypeCode());
 
-        _type_code = orb.create_value_tc(getRepositoryID(), getJavaClass()
-                .getName(), org.omg.CORBA.VM_NONE.value, _base,
-                getValueMembers());
+        Class javaClass = getJavaClass();
+        if (!javaClass.isArray()) {
+            _type_code = orb.create_value_tc(getRepositoryID(), javaClass
+                    .getSimpleName(), org.omg.CORBA.VM_NONE.value, _base,
+                    getValueMembers());
+        } else {
+            TypeDescriptor desc = getTypeRepository().getDescriptor(javaClass.getComponentType());
+            _type_code = desc.getTypeCode();
+            _type_code = orb.create_sequence_tc(0, _type_code);
+            _type_code = orb.create_value_box_tc(getRepositoryID(), "Sequence", _type_code);
+        }
 
         return _type_code;
     }



Mime
View raw message