aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/java_src/com
diff options
context:
space:
mode:
authorNico Kruber <[email protected]>2011-11-30 14:18:42 +0100
committerHenrik Nord <[email protected]>2011-12-09 12:38:52 +0100
commit607ba455098a4750f830a5f29f9739591108647e (patch)
treef046b8453a7c4a918fb9b407e72419182682fddb /lib/jinterface/java_src/com
parent864faca823631cfd46da432b4e405d94d7104429 (diff)
downloadotp-607ba455098a4750f830a5f29f9739591108647e.tar.gz
otp-607ba455098a4750f830a5f29f9739591108647e.tar.bz2
otp-607ba455098a4750f830a5f29f9739591108647e.zip
restore Java5 compatibility
Diffstat (limited to 'lib/jinterface/java_src/com')
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
index 2febd5ce0a..ab7642d49d 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
@@ -102,7 +102,9 @@ public class OtpOutputStream extends ByteArrayOutputStream {
*/
public void trimToSize() {
if (super.count < super.buf.length) {
- super.buf = Arrays.copyOf(super.buf, super.count);
+ final byte[] tmp = new byte[super.count];
+ System.arraycopy(super.buf, 0, tmp, 0, super.count);
+ super.buf = tmp;
}
}