Author: ffang Date: Fri Apr 6 08:12:37 2012 New Revision: 1310218 URL: http://svn.apache.org/viewvc?rev=1310218&view=rev Log: Merged revisions 1310216 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.4.x-fixes
................ r1310216 | ffang | 2012-04-06 16:05:58 +0800 (五, 06 4 2012) | 9 lines Merged revisions 1310214 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes ........ r1310214 | ffang | 2012-04-06 15:57:04 +0800 (五, 06 4 2012) | 1 line [CXF-4227]AttachmentDeserializerTest contains buggy code for reading an InputStream. ........ ................ Modified: cxf/branches/2.3.x-fixes/ (props changed) cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentDeserializerTest.java Propchange: cxf/branches/2.3.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentDeserializerTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentDeserializerTest.java?rev=1310218&r1=1310217&r2=1310218&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentDeserializerTest.java (original) +++ cxf/branches/2.3.x-fixes/rt/core/src/test/java/org/apache/cxf/attachment/AttachmentDeserializerTest.java Fri Apr 6 08:12:37 2012 @@ -486,9 +486,12 @@ public class AttachmentDeserializerTest byte bts[] = new byte[1024]; InputStream ins = ds.getInputStream(); - int count = ins.read(bts, 0, bts.length); - int sz = ins.read(bts, count, bts.length - count); + int count = 0; + int sz = ins.read(bts, 0, bts.length); while (sz != -1) { + count += sz; + // We do not expect the data to fill up the buffer: + assertTrue(count < bts.length); sz = ins.read(bts, count, bts.length - count); } assertEquals(x + 1, count);
