Skip to content

Commit 5819f2d

Browse files
committed
Add missing @OverRide now we are using Java 1.6
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1306487 13f79535-47bb-0310-9956-ffa450edef68
1 parent 9f7dffd commit 5819f2d

20 files changed

Lines changed: 61 additions & 0 deletions

src/main/java/org/apache/commons/codec/StringEncoderComparator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public StringEncoderComparator(StringEncoder stringEncoder) {
6868
* @return the Comparable.compareTo() return code or 0 if an encoding error was caught.
6969
* @see Comparable
7070
*/
71+
@Override
7172
public int compare(Object o1, Object o2) {
7273

7374
int compareCode = 0;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ public Hex(String charsetName) {
225225
* Thrown if an odd number of characters is supplied to this function
226226
* @see #decodeHex(char[])
227227
*/
228+
@Override
228229
public byte[] decode(byte[] array) throws DecoderException {
229230
return decodeHex(new String(array, getCharset()).toCharArray());
230231
}
@@ -242,6 +243,7 @@ public byte[] decode(byte[] array) throws DecoderException {
242243
* char[]
243244
* @see #decodeHex(char[])
244245
*/
246+
@Override
245247
public Object decode(Object object) throws DecoderException {
246248
try {
247249
char[] charArray = object instanceof String ? ((String) object).toCharArray() : (char[]) object;
@@ -266,6 +268,7 @@ public Object decode(Object object) throws DecoderException {
266268
* @since 1.7 No longer throws IllegalStateException if the charsetName is invalid.
267269
* @see #encodeHex(byte[])
268270
*/
271+
@Override
269272
public byte[] encode(byte[] array) {
270273
return encodeHexString(array).getBytes(this.getCharset());
271274
}
@@ -286,6 +289,7 @@ public byte[] encode(byte[] array) {
286289
* Thrown if the given object is not a String or byte[]
287290
* @see #encodeHex(byte[])
288291
*/
292+
@Override
289293
public Object encode(Object object) throws EncoderException {
290294
try {
291295
byte[] byteArray = object instanceof String ? ((String) object).getBytes(this.getCharset()) : (byte[]) object;

src/main/java/org/apache/commons/codec/language/AbstractCaverphone.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public AbstractCaverphone() {
5151
* @throws EncoderException
5252
* if the parameter supplied is not of type java.lang.String
5353
*/
54+
@Override
5455
public Object encode(Object source) throws EncoderException {
5556
if (!(source instanceof String)) {
5657
throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String");

src/main/java/org/apache/commons/codec/language/Caverphone.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public String caverphone(String source) {
7070
* @throws EncoderException
7171
* if the parameter supplied is not of type java.lang.String
7272
*/
73+
@Override
7374
public Object encode(Object obj) throws EncoderException {
7475
if (!(obj instanceof String)) {
7576
throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String");
@@ -84,6 +85,7 @@ public Object encode(Object obj) throws EncoderException {
8485
* String object to encode
8586
* @return The caverphone code corresponding to the String supplied
8687
*/
88+
@Override
8789
public String encode(String str) {
8890
return this.caverphone(str);
8991
}

src/main/java/org/apache/commons/codec/language/Caverphone1.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class Caverphone1 extends AbstractCaverphone {
4040
* String the source string
4141
* @return A caverphone code for the given String
4242
*/
43+
@Override
4344
public String encode(String source) {
4445
String txt = source;
4546
if (txt == null || txt.length() == 0) {

src/main/java/org/apache/commons/codec/language/Caverphone2.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class Caverphone2 extends AbstractCaverphone {
4040
* String the source string
4141
* @return A caverphone code for the given String
4242
*/
43+
@Override
4344
public String encode(String source) {
4445
String txt = source;
4546
if (txt == null || txt.length() == 0) {

src/main/java/org/apache/commons/codec/language/ColognePhonetic.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ public String colognePhonetic(String text) {
387387
return output.toString();
388388
}
389389

390+
@Override
390391
public Object encode(Object object) throws EncoderException {
391392
if (!(object instanceof String)) {
392393
throw new EncoderException("This method's parameter was expected to be of the type " +
@@ -398,6 +399,7 @@ public Object encode(Object object) throws EncoderException {
398399
return encode((String) object);
399400
}
400401

402+
@Override
401403
public String encode(String text) {
402404
return colognePhonetic(text);
403405
}

src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public String doubleMetaphone(String value, boolean alternate) {
194194
* @return An encoded Object (will be of type String)
195195
* @throws EncoderException encode parameter is not of type String
196196
*/
197+
@Override
197198
public Object encode(Object obj) throws EncoderException {
198199
if (!(obj instanceof String)) {
199200
throw new EncoderException("DoubleMetaphone encode parameter is not of type String");
@@ -207,6 +208,7 @@ public Object encode(Object obj) throws EncoderException {
207208
* @param value String to encode
208209
* @return An encoded String
209210
*/
211+
@Override
210212
public String encode(String value) {
211213
return doubleMetaphone(value);
212214
}

src/main/java/org/apache/commons/codec/language/Metaphone.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ private boolean isLastChar(int wdsz, int n) {
363363
* @throws EncoderException if the parameter supplied is not
364364
* of type java.lang.String
365365
*/
366+
@Override
366367
public Object encode(Object obj) throws EncoderException {
367368
if (!(obj instanceof String)) {
368369
throw new EncoderException("Parameter supplied to Metaphone encode is not of type java.lang.String");
@@ -376,6 +377,7 @@ public Object encode(Object obj) throws EncoderException {
376377
* @param str String object to encode
377378
* @return The metaphone code corresponding to the String supplied
378379
*/
380+
@Override
379381
public String encode(String str) {
380382
return metaphone(str);
381383
}

src/main/java/org/apache/commons/codec/language/Nysiis.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public Nysiis(final boolean strict) {
206206
* @throws IllegalArgumentException
207207
* if a character is not mapped
208208
*/
209+
@Override
209210
public Object encode(Object obj) throws EncoderException {
210211
if (!(obj instanceof String)) {
211212
throw new EncoderException("Parameter supplied to Nysiis encode is not of type java.lang.String");
@@ -222,6 +223,7 @@ public Object encode(Object obj) throws EncoderException {
222223
* @throws IllegalArgumentException
223224
* if a character is not mapped
224225
*/
226+
@Override
225227
public String encode(String str) {
226228
return this.nysiis(str);
227229
}

0 commit comments

Comments
 (0)