| Index: src/java/org/apache/lucene/analysis/BaseCharFilter.java |
| =================================================================== |
| --- src/java/org/apache/lucene/analysis/BaseCharFilter.java (revision 827798) |
| +++ src/java/org/apache/lucene/analysis/BaseCharFilter.java (working copy) |
| @@ -49,8 +49,8 @@ |
| return currentOff; |
| } |
| for (int i = pcmList.size() - 1; i >= 0; i--) { |
| - if (currentOff >= ((OffCorrectMap) pcmList.get(i)).off) { |
| - return currentOff + ((OffCorrectMap) pcmList.get(i)).cumulativeDiff; |
| + if (currentOff >= pcmList.get(i).off) { |
| + return currentOff + pcmList.get(i).cumulativeDiff; |
| } |
| } |
| return currentOff; |
| @@ -58,7 +58,7 @@ |
| |
| protected int getLastCumulativeDiff() { |
| return pcmList == null || pcmList.isEmpty() ? |
| - 0 : ((OffCorrectMap)pcmList.get(pcmList.size() - 1)).cumulativeDiff; |
| + 0 : pcmList.get(pcmList.size() - 1).cumulativeDiff; |
| } |
| |
| protected void addOffCorrectMap(int off, int cumulativeDiff) { |
| Index: src/java/org/apache/lucene/document/Document.java |
| =================================================================== |
| --- src/java/org/apache/lucene/document/Document.java (revision 827798) |
| +++ src/java/org/apache/lucene/document/Document.java (working copy) |
| @@ -102,7 +102,7 @@ |
| public final void removeField(String name) { |
| Iterator<Fieldable> it = fields.iterator(); |
| while (it.hasNext()) { |
| - Fieldable field = (Fieldable)it.next(); |
| + Fieldable field = it.next(); |
| if (field.name().equals(name)) { |
| it.remove(); |
| return; |
| @@ -122,7 +122,7 @@ |
| public final void removeFields(String name) { |
| Iterator<Fieldable> it = fields.iterator(); |
| while (it.hasNext()) { |
| - Fieldable field = (Fieldable)it.next(); |
| + Fieldable field = it.next(); |
| if (field.name().equals(name)) { |
| it.remove(); |
| } |
| @@ -196,7 +196,7 @@ |
| if (result.size() == 0) |
| return NO_FIELDS; |
| |
| - return (Field[])result.toArray(new Field[result.size()]); |
| + return result.toArray(new Field[result.size()]); |
| } |
| |
| |
| @@ -221,7 +221,7 @@ |
| if (result.size() == 0) |
| return NO_FIELDABLES; |
| |
| - return (Fieldable[])result.toArray(new Fieldable[result.size()]); |
| + return result.toArray(new Fieldable[result.size()]); |
| } |
| |
| |
| @@ -244,7 +244,7 @@ |
| if (result.size() == 0) |
| return NO_STRINGS; |
| |
| - return (String[])result.toArray(new String[result.size()]); |
| + return result.toArray(new String[result.size()]); |
| } |
| |
| private final static byte[][] NO_BYTES = new byte[0][]; |
| @@ -268,7 +268,7 @@ |
| if (result.size() == 0) |
| return NO_BYTES; |
| |
| - return (byte[][])result.toArray(new byte[result.size()][]); |
| + return result.toArray(new byte[result.size()][]); |
| } |
| |
| /** |