Skip to content

Commit fdd0f94

Browse files
committed
CologneBuffer does not need to implement CharSequence which then does not need to implement charAt and subSequence, which are themselves not used.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1063350 13f79535-47bb-0310-9956-ffa450edef68
1 parent eb8b793 commit fdd0f94

1 file changed

Lines changed: 3 additions & 16 deletions

File tree

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

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
*/
181181
public class ColognePhonetic implements StringEncoder {
182182

183-
private abstract class CologneBuffer implements CharSequence {
183+
private abstract class CologneBuffer {
184184

185185
protected final char[] data;
186186
protected int length = 0;
@@ -191,15 +191,8 @@ public CologneBuffer(char[] data) {
191191
}
192192

193193
public CologneBuffer(int buffSize) {
194-
data = new char[buffSize];
195-
}
196-
197-
public char charAt(int index) {
198-
if (index < length) {
199-
return data[index];
200-
} else {
201-
throw new IndexOutOfBoundsException();
202-
}
194+
this.data = new char[buffSize];
195+
this.length = 0;
203196
}
204197

205198
protected abstract char[] copyData(int start, final int length);
@@ -210,12 +203,6 @@ public int length() {
210203
return length;
211204
}
212205

213-
public CharSequence subSequence(int start, int end) {
214-
final int length = end - start;
215-
char[] newData = copyData(start, length);
216-
return createCologneBuffer(newData);
217-
}
218-
219206
public String toString() {
220207
return new String(copyData(0, length));
221208
}

0 commit comments

Comments
 (0)