Skip to content

Commit 3976e6d

Browse files
committed
Java 1.6 requires @OverRide for implementations
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1309096 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9bdd4a4 commit 3976e6d

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/java/org/apache/commons/codec/binary/BaseNCodec.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ protected static boolean isWhiteSpace(byte byteToCheck) {
283283
* @throws EncoderException
284284
* if the parameter supplied is not of type byte[]
285285
*/
286+
@Override
286287
public Object encode(Object obj) throws EncoderException {
287288
if (!(obj instanceof byte[])) {
288289
throw new EncoderException("Parameter supplied to Base-N encode is not a byte[]");
@@ -311,6 +312,7 @@ public String encodeToString(byte[] pArray) {
311312
* @throws DecoderException
312313
* if the parameter supplied is not of type byte[]
313314
*/
315+
@Override
314316
public Object decode(Object obj) throws DecoderException {
315317
if (obj instanceof byte[]) {
316318
return decode((byte[]) obj);
@@ -339,6 +341,7 @@ public byte[] decode(String pArray) {
339341
* A byte array containing Base-N character data
340342
* @return a byte array containing binary data
341343
*/
344+
@Override
342345
public byte[] decode(byte[] pArray) {
343346
Context context = new Context();
344347
if (pArray == null || pArray.length == 0) {
@@ -358,6 +361,7 @@ public byte[] decode(byte[] pArray) {
358361
* a byte array containing binary data
359362
* @return A byte array containing only the basen alphabetic character data
360363
*/
364+
@Override
361365
public byte[] encode(byte[] pArray) {
362366
Context context = new Context();
363367
if (pArray == null || pArray.length == 0) {

src/main/java/org/apache/commons/codec/binary/BinaryCodec.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public class BinaryCodec implements BinaryDecoder, BinaryEncoder {
7676
* @return 0 and 1 ASCII character bytes one for each bit of the argument
7777
* @see org.apache.commons.codec.BinaryEncoder#encode(byte[])
7878
*/
79+
@Override
7980
public byte[] encode(byte[] raw) {
8081
return toAsciiBytes(raw);
8182
}
@@ -90,6 +91,7 @@ public byte[] encode(byte[] raw) {
9091
* if the argument is not a byte[]
9192
* @see org.apache.commons.codec.Encoder#encode(Object)
9293
*/
94+
@Override
9395
public Object encode(Object raw) throws EncoderException {
9496
if (!(raw instanceof byte[])) {
9597
throw new EncoderException("argument not a byte array");
@@ -107,6 +109,7 @@ public Object encode(Object raw) throws EncoderException {
107109
* if argument is not a byte[], char[] or String
108110
* @see org.apache.commons.codec.Decoder#decode(Object)
109111
*/
112+
@Override
110113
public Object decode(Object ascii) throws DecoderException {
111114
if (ascii == null) {
112115
return EMPTY_BYTE_ARRAY;
@@ -131,6 +134,7 @@ public Object decode(Object ascii) throws DecoderException {
131134
* @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
132135
* @see org.apache.commons.codec.Decoder#decode(Object)
133136
*/
137+
@Override
134138
public byte[] decode(byte[] ascii) {
135139
return fromAscii(ascii);
136140
}

0 commit comments

Comments
 (0)