remove useless casts

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1003870 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-10-02 19:26:36 +00:00
parent 9a7eb4e2b3
commit cdc93f3b79
2 changed files with 6 additions and 6 deletions

View File

@ -304,7 +304,7 @@ public final class FuzzyTermsEnum extends TermsEnum {
final float similarity = 1.0f - ((float) i / (float)
(Math.min(codePointCount, termLength)));
if (similarity > minSimilarity) {
boostAtt.setBoost((float) ((similarity - minSimilarity) * scale_factor));
boostAtt.setBoost((similarity - minSimilarity) * scale_factor);
return AcceptStatus.YES_AND_SEEK;
} else {
return AcceptStatus.NO_AND_SEEK;
@ -380,7 +380,7 @@ public final class FuzzyTermsEnum extends TermsEnum {
UnicodeUtil.UTF8toUTF32(term, utf32);
final float similarity = similarity(utf32.ints, realPrefixLength, utf32.length - realPrefixLength);
if (similarity > minSimilarity) {
boostAtt.setBoost((float)((similarity - minSimilarity) * scale_factor));
boostAtt.setBoost((similarity - minSimilarity) * scale_factor);
return AcceptStatus.YES;
} else return AcceptStatus.NO;
} else {

View File

@ -101,7 +101,7 @@ public final class PagedBytes {
b.length = block[offset];
b.offset = offset+1;
} else {
b.length = (((int) (block[offset] & 0x7f)) << 8) | (block[1+offset] & 0xff);
b.length = ((block[offset] & 0x7f) << 8) | (block[1+offset] & 0xff);
b.offset = offset+2;
assert b.length > 0;
}
@ -118,7 +118,7 @@ public final class PagedBytes {
b.length = block[offset];
b.offset = offset+1;
} else {
b.length = (((int) (block[offset] & 0x7f)) << 8) | (block[1+offset] & 0xff);
b.length = ((block[offset] & 0x7f) << 8) | (block[1+offset] & 0xff);
b.offset = offset+2;
assert b.length > 0;
}
@ -138,7 +138,7 @@ public final class PagedBytes {
b.offset = offset+1;
start += 1L + b.length;
} else {
b.length = (((int) (block[offset] & 0x7f)) << 8) | (block[1+offset] & 0xff);
b.length = ((block[offset] & 0x7f) << 8) | (block[1+offset] & 0xff);
b.offset = offset+2;
start += 2L + b.length;
assert b.length > 0;
@ -216,7 +216,7 @@ public final class PagedBytes {
byteCount -= left;
bytesUpto += left;
} else {
System.arraycopy(bytes.bytes, bytesUpto, currentBlock, upto, (int) byteCount);
System.arraycopy(bytes.bytes, bytesUpto, currentBlock, upto, byteCount);
upto += byteCount;
break;
}