aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/java_src/com
diff options
context:
space:
mode:
authorVlad Dumitrescu <[email protected]>2014-06-02 14:37:01 +0200
committerVlad Dumitrescu <[email protected]>2014-06-02 14:47:21 +0200
commitdde150ead634973595d16a40dca7bfe86abae4f2 (patch)
tree7deefef7389d1adec9e908601176de4594a22dc5 /lib/jinterface/java_src/com
parent6b6cd01b607a1bfcf61bb6d5f4cc3fe9b37445db (diff)
downloadotp-dde150ead634973595d16a40dca7bfe86abae4f2.tar.gz
otp-dde150ead634973595d16a40dca7bfe86abae4f2.tar.bz2
otp-dde150ead634973595d16a40dca7bfe86abae4f2.zip
jinterface: OtpInputStream exceptions show useless value
Arrays have no meaningful toString method, but one must use Arrays.toString instead. The meaningless value would look for example like "[C@16f0472", instead of "[2,4]".
Diffstat (limited to 'lib/jinterface/java_src/com')
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
index 0d1342d796..f813594541 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
@@ -21,6 +21,7 @@ package com.ericsson.otp.erlang;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
/**
* Provides a stream for decoding Erlang terms from external format.
@@ -819,7 +820,7 @@ public class OtpInputStream extends ByteArrayInputStream {
if (unsigned) {
if (c < 0) {
throw new OtpErlangDecodeException("Value not unsigned: "
- + b);
+ + Arrays.toString(b));
}
while (b[i] == 0) {
i++; // Skip leading zero sign bytes
@@ -844,7 +845,7 @@ public class OtpInputStream extends ByteArrayInputStream {
if (b.length - i > 8) {
// More than 64 bits of value
throw new OtpErlangDecodeException(
- "Value does not fit in long: " + b);
+ "Value does not fit in long: " + Arrays.toString(b));
}
// Convert the necessary bytes
for (v = c < 0 ? -1 : 0; i < b.length; i++) {