diff --git a/core/src/main/java/org/jacorb/orb/CDROutputStream.java b/core/src/main/java/org/jacorb/orb/CDROutputStream.java index 7f47cb8..4d8fcb9 100644 --- a/core/src/main/java/org/jacorb/orb/CDROutputStream.java +++ b/core/src/main/java/org/jacorb/orb/CDROutputStream.java @@ -1875,7 +1875,7 @@ public class CDROutputStream } Integer index = getValueMap().get (value); - if (index != null) + if (index != null && isIndirectionEnabled()) { // value has already been written -- make an indirection write_long (0xffffffff); @@ -1891,7 +1891,7 @@ public class CDROutputStream private void write_repository_id(final String repository_id) { Integer _index = getRepIdMap().get (repository_id); - if ( _index == null) + if ( _index == null || !isIndirectionEnabled() ) { // a new repository id -- write it @@ -1929,7 +1929,7 @@ public class CDROutputStream { _index = getCodebaseMap().get (codebase); } - if ( _index == null) + if ( _index == null && !isIndirectionEnabled()) { // a new codebase -- write it# @@ -2180,7 +2180,7 @@ public class CDROutputStream { // look at the new value Integer index = getValueMap().get(newValue); - if (index != null) + if (index != null && isIndirectionEnabled()) { // previously marshaled value -- make an indirection write_long (0xffffffff); diff --git a/core/src/main/java/org/jacorb/orb/typecode/DelegatingTypeCodeWriter.java b/core/src/main/java/org/jacorb/orb/typecode/DelegatingTypeCodeWriter.java index 20308a6..c390831 100644 --- a/core/src/main/java/org/jacorb/orb/typecode/DelegatingTypeCodeWriter.java +++ b/core/src/main/java/org/jacorb/orb/typecode/DelegatingTypeCodeWriter.java @@ -68,7 +68,7 @@ public class DelegatingTypeCodeWriter { try { - if(TypeCode.isRecursive(typeCode) && recursiveTCMap.containsKey(typeCode.id())) + if(out.isIndirectionEnabled() && TypeCode.isRecursive(typeCode) && recursiveTCMap.containsKey(typeCode.id())) { writeIndirectionMarker(out, typeCode.id(), recursiveTCMap); }