Skip to content

Commit 608a7d6

Browse files
committed
[CODEC-124] Remove deprecated code for 2.0.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1125236 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0626e9b commit 608a7d6

11 files changed

Lines changed: 335 additions & 559 deletions

File tree

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249
<configuration>
250250
<xmlPath>${basedir}/src/changes/changes.xml</xmlPath>
251251
<issueLinkTemplate>%URL%/%ISSUE%</issueLinkTemplate>
252+
<!-- TODO: <onlyCurrentVersion>true</onlyCurrentVersion> -->
252253
</configuration>
253254
<reportSets>
254255
<reportSet>

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ public class StringEncoderComparator implements Comparator {
3434
*/
3535
private final StringEncoder stringEncoder;
3636

37-
/**
38-
* Constructs a new instance.
39-
*
40-
* @deprecated Creating an instance without a {@link StringEncoder} leads to a {@link NullPointerException}. Will be
41-
* removed in 2.0.
42-
*/
43-
@Deprecated
44-
public StringEncoderComparator() {
45-
this.stringEncoder = null; // Trying to use this will cause things to break
46-
}
47-
4837
/**
4938
* Constructs a new instance with the given algorithm.
5039
*

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -492,21 +492,6 @@ public static boolean isBase64(byte octet) {
492492
public static boolean isBase64(String base64) {
493493
return isBase64(StringUtils.getBytesUtf8(base64));
494494
}
495-
496-
/**
497-
* Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the
498-
* method treats whitespace as valid.
499-
*
500-
* @param arrayOctet
501-
* byte array to test
502-
* @return <code>true</code> if all bytes are valid characters in the Base64 alphabet or if the byte array is empty;
503-
* <code>false</code>, otherwise
504-
* @deprecated 1.5 Use {@link #isBase64(byte[])}, will be removed in 2.0.
505-
*/
506-
@Deprecated
507-
public static boolean isArrayByteBase64(byte[] arrayOctet) {
508-
return isBase64(arrayOctet);
509-
}
510495

511496
/**
512497
* Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the

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

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/java/org/apache/commons/codec/language/Soundex.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ public int difference(String s1, String s2) throws EncoderException {
8080
return SoundexUtils.difference(this, s1, s2);
8181
}
8282

83-
/**
84-
* The maximum length of a Soundex code - Soundex codes are only four characters by definition.
85-
*
86-
* @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
87-
*/
88-
@Deprecated
89-
private int maxLength = 4;
90-
9183
/**
9284
* Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each
9385
* letter is mapped. This implementation contains a default map for US_ENGLISH
@@ -194,17 +186,6 @@ private char getMappingCode(String str, int index) {
194186
return mappedChar;
195187
}
196188

197-
/**
198-
* Returns the maxLength. Standard Soundex
199-
*
200-
* @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
201-
* @return int
202-
*/
203-
@Deprecated
204-
public int getMaxLength() {
205-
return this.maxLength;
206-
}
207-
208189
/**
209190
* Returns the soundex mapping.
210191
*
@@ -231,18 +212,6 @@ private char map(char ch) {
231212
return this.getSoundexMapping()[index];
232213
}
233214

234-
/**
235-
* Sets the maxLength.
236-
*
237-
* @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
238-
* @param maxLength
239-
* The maxLength to set
240-
*/
241-
@Deprecated
242-
public void setMaxLength(int maxLength) {
243-
this.maxLength = maxLength;
244-
}
245-
246215
/**
247216
* Retrieves the Soundex code for a given String object.
248217
*

src/java/org/apache/commons/codec/net/URLCodec.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,18 +338,6 @@ public Object decode(Object pObject) throws DecoderException {
338338
}
339339
}
340340

341-
/**
342-
* The <code>String</code> encoding used for decoding and encoding.
343-
*
344-
* @return Returns the encoding.
345-
*
346-
* @deprecated Use {@link #getDefaultCharset()}, will be removed in 2.0.
347-
*/
348-
@Deprecated
349-
public String getEncoding() {
350-
return this.charset;
351-
}
352-
353341
/**
354342
* The default charset used for string decoding and encoding.
355343
*

src/test/org/apache/commons/codec/StringEncoderComparatorTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
*/
3737
public class StringEncoderComparatorTest {
3838

39-
@Test
40-
public void testComparatorNoArgCon() throws Exception {
41-
new StringEncoderComparator();
42-
}
43-
4439
@Test
4540
public void testComparatorWithSoundex() throws Exception {
4641
StringEncoderComparator sCompare =

0 commit comments

Comments
 (0)