Skip to content

Commit 16541c6

Browse files
committed
Remove some more unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@669667 13f79535-47bb-0310-9956-ffa450edef68
1 parent ce8a31b commit 16541c6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/java/org/apache/commons/codec/binary/Base64.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class Base64 implements BinaryEncoder, BinaryDecoder {
6161
/**
6262
* Byte used to pad output.
6363
*/
64-
private static final byte PAD = (byte) '=';
64+
private static final byte PAD = '=';
6565

6666

6767
// The static final fields above are used for the original static byte[] methods on Base64.
@@ -434,7 +434,7 @@ void decode(byte[] in, int inPos, int inAvail) {
434434
if (b >= 0 && b < base64ToInt.length) {
435435
int result = base64ToInt[b];
436436
if (result >= 0) {
437-
modulus = (byte) ((++modulus) % 4);
437+
modulus = (++modulus) % 4;
438438
x = (x << 6) + result;
439439
if (modulus == 0) {
440440
buf[pos++] = (byte) ((x >> 16) & 0xff);
@@ -614,10 +614,10 @@ static byte[] discardWhitespace(byte[] data) {
614614

615615
for (int i = 0; i < data.length; i++) {
616616
switch (data[i]) {
617-
case (byte) ' ' :
618-
case (byte) '\n' :
619-
case (byte) '\r' :
620-
case (byte) '\t' :
617+
case ' ' :
618+
case '\n' :
619+
case '\r' :
620+
case '\t' :
621621
break;
622622
default :
623623
groomedData[bytesCopied++] = data[i];

0 commit comments

Comments
 (0)