When we try to rewrite a big array octet on a RequestOutputStream using write_octet_array method we have an exception later on writing this RequestOutputStream on a connection. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at java.io.BufferedOutputStream.write(Unknown Source) at org.jacorb.orb.etf.StreamConnectionBase.write StreamConnectionBase.java:190) at org.jacorb.orb.giop.GIOPConnection.write(GIOPConnection.java:949) at org.jacorb.orb.CDROutputStream.write(CDROutputStream.java:450) at org.jacorb.orb.giop.ServiceContextTransportingOutputStream.write_to(ServiceContextTransportingOutputStream.java:143) at org.jacorb.orb.giop.RequestOutputStream.write_to(RequestOutputStream.java:309) at org.jacorb.orb.giop.GIOPConnection.sendMessage(GIOPConnection.java:1060) Problem is that, on method write_octet_array Jacorb always adds a new DefferedWriteFrame whithout looking for writing current index.
Created attachment 403 [details] test case
Created attachment 404 [details] proposal correction
Fix and adapted manual test into automated regression test. https://github.com/JacORB/JacORB/pull/59