Skip to content

Commit 4449af5

Browse files
committed
[CODEC-77] Base64 bug with empty input (new byte[0])
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@793736 13f79535-47bb-0310-9956-ffa450edef68
1 parent b8c2d9d commit 4449af5

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
package org.apache.commons.codec.binary;
1919

20+
import java.io.UnsupportedEncodingException;
21+
import java.math.BigInteger;
22+
2023
import org.apache.commons.codec.BinaryDecoder;
2124
import org.apache.commons.codec.BinaryEncoder;
2225
import org.apache.commons.codec.DecoderException;
2326
import org.apache.commons.codec.EncoderException;
2427

25-
import java.io.UnsupportedEncodingException;
26-
import java.math.BigInteger;
27-
2828
/**
2929
* Provides Base64 encoding and decoding as defined by RFC 2045.
3030
*

src/test/org/apache/commons/codec/binary/Base64InputStreamTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
package org.apache.commons.codec.binary;
1919

2020

21-
import junit.framework.TestCase;
22-
2321
import java.io.ByteArrayInputStream;
2422
import java.io.InputStream;
2523
import java.util.Arrays;
2624

25+
import junit.framework.TestCase;
26+
2727
/**
2828
* @author Apache Software Foundation
2929
* @version $Id $

src/test/org/apache/commons/codec/binary/Base64OutputStreamTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
package org.apache.commons.codec.binary;
1919

2020

21-
import junit.framework.TestCase;
22-
2321
import java.io.ByteArrayOutputStream;
2422
import java.io.OutputStream;
2523
import java.util.Arrays;
2624

25+
import junit.framework.TestCase;
26+
2727
/**
2828
* @author Apache Software Foundation
2929
* @version $Id $

src/test/org/apache/commons/codec/binary/Base64Test.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919

2020

2121
import java.io.UnsupportedEncodingException;
22+
import java.math.BigInteger;
2223
import java.util.Arrays;
2324
import java.util.Random;
24-
import java.math.BigInteger;
25+
26+
import junit.framework.TestCase;
2527

2628
import org.apache.commons.codec.DecoderException;
2729
import org.apache.commons.codec.EncoderException;
2830

29-
import junit.framework.TestCase;
30-
3131
/**
3232
* Test cases for Base64 class.
3333
*

0 commit comments

Comments
 (0)