Refactor instance variables that act like temps into locals
diff --git a/src/main/java/org/apache/commons/codec/binary/Base64.java b/src/main/java/org/apache/commons/codec/binary/Base64.java
index 79b3172..775a75a 100644
--- a/src/main/java/org/apache/commons/codec/binary/Base64.java
+++ b/src/main/java/org/apache/commons/codec/binary/Base64.java
@@ -435,12 +435,6 @@
/**
* Convenience variable to help us determine when our buffer is going to run out of room and needs resizing.
- * {@code decodeSize = 3 + lineSeparator.length;}
- */
- private final int decodeSize;
-
- /**
- * Convenience variable to help us determine when our buffer is going to run out of room and needs resizing.
* {@code encodeSize = 4 + lineSeparator.length;}
*/
private final int encodeSize;
@@ -665,7 +659,6 @@
this.encodeSize = BYTES_PER_ENCODED_BLOCK;
this.lineSeparator = null;
}
- this.decodeSize = this.encodeSize - 1;
}
// Implementation of the Encoder Interface
@@ -718,6 +711,7 @@
if (inAvail < 0) {
context.eof = true;
}
+ final int decodeSize = this.encodeSize - 1;
for (int i = 0; i < inAvail; i++) {
final byte[] buffer = ensureBufferSize(decodeSize, context);
final byte b = input[inPos++];