You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/04/03 20:54:06 UTC

svn commit: r1309096 - in /commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary: BaseNCodec.java BinaryCodec.java

Author: sebb
Date: Tue Apr  3 18:54:06 2012
New Revision: 1309096

URL: http://svn.apache.org/viewvc?rev=1309096&view=rev
Log:
Java 1.6 requires @Override for implementations

Modified:
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java?rev=1309096&r1=1309095&r2=1309096&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java Tue Apr  3 18:54:06 2012
@@ -283,6 +283,7 @@ public abstract class BaseNCodec impleme
      * @throws EncoderException
      *             if the parameter supplied is not of type byte[]
      */
+    @Override
     public Object encode(Object obj) throws EncoderException {
         if (!(obj instanceof byte[])) {
             throw new EncoderException("Parameter supplied to Base-N encode is not a byte[]");
@@ -311,6 +312,7 @@ public abstract class BaseNCodec impleme
      * @throws DecoderException
      *             if the parameter supplied is not of type byte[]
      */
+    @Override
     public Object decode(Object obj) throws DecoderException {        
         if (obj instanceof byte[]) {
             return decode((byte[]) obj);
@@ -339,6 +341,7 @@ public abstract class BaseNCodec impleme
      *            A byte array containing Base-N character data
      * @return a byte array containing binary data
      */
+    @Override
     public byte[] decode(byte[] pArray) {
         Context context = new Context();
         if (pArray == null || pArray.length == 0) {
@@ -358,6 +361,7 @@ public abstract class BaseNCodec impleme
      *            a byte array containing binary data
      * @return A byte array containing only the basen alphabetic character data
      */
+    @Override
     public byte[] encode(byte[] pArray) {
         Context context = new Context();
         if (pArray == null || pArray.length == 0) {

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java?rev=1309096&r1=1309095&r2=1309096&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BinaryCodec.java Tue Apr  3 18:54:06 2012
@@ -76,6 +76,7 @@ public class BinaryCodec implements Bina
      * @return 0 and 1 ASCII character bytes one for each bit of the argument
      * @see org.apache.commons.codec.BinaryEncoder#encode(byte[])
      */
+    @Override
     public byte[] encode(byte[] raw) {
         return toAsciiBytes(raw);
     }
@@ -90,6 +91,7 @@ public class BinaryCodec implements Bina
      *                  if the argument is not a byte[]
      * @see org.apache.commons.codec.Encoder#encode(Object)
      */
+    @Override
     public Object encode(Object raw) throws EncoderException {
         if (!(raw instanceof byte[])) {
             throw new EncoderException("argument not a byte array");
@@ -107,6 +109,7 @@ public class BinaryCodec implements Bina
      *                  if argument is not a byte[], char[] or String
      * @see org.apache.commons.codec.Decoder#decode(Object)
      */
+    @Override
     public Object decode(Object ascii) throws DecoderException {
         if (ascii == null) {
             return EMPTY_BYTE_ARRAY;
@@ -131,6 +134,7 @@ public class BinaryCodec implements Bina
      * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
      * @see org.apache.commons.codec.Decoder#decode(Object)
      */
+    @Override
     public byte[] decode(byte[] ascii) {
         return fromAscii(ascii);
     }