From d24b633665a0e8433bea61d46ce7dfd2f56024e2 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 27 Nov 2007 16:59:49 -0700 Subject: [PATCH] fix return value of ByteArrayOutputStream.size() --- classpath/java/io/ByteArrayOutputStream.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/classpath/java/io/ByteArrayOutputStream.java b/classpath/java/io/ByteArrayOutputStream.java index 3f6d3fdc0f..8c74d091f6 100644 --- a/classpath/java/io/ByteArrayOutputStream.java +++ b/classpath/java/io/ByteArrayOutputStream.java @@ -15,7 +15,7 @@ public class ByteArrayOutputStream extends OutputStream { } public int size() { - return position; + return length; } public void write(int c) { @@ -65,7 +65,6 @@ public class ByteArrayOutputStream extends OutputStream { buffer = null; position = 0; chain = new Cell(b, 0, p, chain); - length -= p; } }