aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
diff options
context:
space:
mode:
authorVlad Dumitrescu <[email protected]>2014-09-10 11:32:50 +0200
committerVlad Dumitrescu <[email protected]>2014-09-11 21:24:25 +0200
commitd0a1059d551c86d41ecbb36a1f23516eb71679c6 (patch)
tree0d09037d9e05c697a368e89a08e95166a30ec008 /lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
parent4725d4cc06ded1c9ee2712330e233aa865df3ebd (diff)
downloadotp-d0a1059d551c86d41ecbb36a1f23516eb71679c6.tar.gz
otp-d0a1059d551c86d41ecbb36a1f23516eb71679c6.tar.bz2
otp-d0a1059d551c86d41ecbb36a1f23516eb71679c6.zip
keep all method parameters final
Diffstat (limited to 'lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java')
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java14
1 files changed, 8 insertions, 6 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 e082a1bda0..6e91a855a0 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
@@ -284,10 +284,11 @@ public class OtpOutputStream extends ByteArrayOutputStream {
* @param b
* the number of bytes to write from the little end.
*/
- public void writeLE(long n, final int b) {
+ public void writeLE(final long n, final int b) {
+ long v = n;
for (int i = 0; i < b; i++) {
- write((byte) (n & 0xff));
- n >>= 8;
+ write((byte) (v & 0xff));
+ v >>= 8;
}
}
@@ -517,16 +518,17 @@ public class OtpOutputStream extends ByteArrayOutputStream {
write_double(f);
}
- public void write_big_integer(BigInteger v) {
+ public void write_big_integer(final BigInteger v) {
if (v.bitLength() < 64) {
this.write_long(v.longValue(), true);
return;
}
final int signum = v.signum();
+ BigInteger val = v;
if (signum < 0) {
- v = v.negate();
+ val = val.negate();
}
- final byte[] magnitude = v.toByteArray();
+ final byte[] magnitude = val.toByteArray();
final int n = magnitude.length;
// Reverse the array to make it little endian.
for (int i = 0, j = n; i < j--; i++) {