Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > ad21c87845a68d818b9c65389ae464c0 > files > 5

jacorb-2.3.0-1.0.7mdv2010.0.src.rpm

# The size of a chunk should not include any bytes of padding that might have
# been added after the chunk for alignment purposes. This patch allows JacORB 
# to interoperate with the ORB in Sun's JDK 1.5 with chunking of custom RMI
# valuetypes enabled (jacorb.interop.chunk_custom_rmi_valuetypes=on), as it 
# should be per the CORBA spec. 

diff -r -u --ignore-all-space 2.3.0zip/JacORB/src/org/jacorb/orb/CDROutputStream.java 2.3.0cvs/JacORB/src/org/jacorb/orb/CDROutputStream.java
--- src/org/jacorb/orb/CDROutputStream.java	2007-05-28 15:53:38.000000000 -0400
+++ src/org/jacorb/orb/CDROutputStream.java	2007-05-28 16:12:19.000000000 -0400
@@ -47,7 +47,7 @@
 
 /**
  * @author Gerald Brose,  1999
- * @version $Id: CDROutputStream.java,v 1.122 2006/11/30 13:11:07 alphonse.bendt Exp $
+ * @version $Id: CDROutputStream.java,v 1.123 2007/04/26 23:07:26 francisco Exp $
  *
  * A stream for CDR marshalling.
  *
@@ -2484,9 +2484,9 @@
     {
         if (!write_special_value (value))
         {
+            write_previous_chunk_size();
             check(7,4);
             getValueMap().put (value, ObjectUtil.newInteger(pos));
-            write_previous_chunk_size();
             if ((value instanceof org.omg.CORBA.portable.IDLEntity) ||
                 (value instanceof java.lang.String))
             {
@@ -2635,7 +2635,6 @@
      */
     private void write_value_header(final String[] repository_ids)
     {
-        write_previous_chunk_size();
         if (repository_ids != null)
         {
             if( repository_ids.length > 1 )
@@ -2670,7 +2669,6 @@
     {
         if (codebase != null)
         {
-            write_previous_chunk_size();
             if ( repository_ids != null )
             {
                 if( repository_ids.length > 1 )
@@ -2718,6 +2716,7 @@
     private void write_value_internal(final java.io.Serializable value,
                                        final String repository_id)
     {
+    	write_previous_chunk_size();
         check(7,4);
         getValueMap().put(value, ObjectUtil.newInteger(pos));