[errorprone] SimilarityRenameDetector: suppress IntLongMath

Indexes are positiv.

See https://errorprone.info/bugpattern/IntLongMath

Change-Id: I9ef90b3667f833e2d708ff608929990e0a09036c
This commit is contained in:
Matthias Sohn 2023-09-22 00:43:54 +02:00
parent 7092803ad2
commit 254ffbfb0d
1 changed files with 2 additions and 0 deletions

View File

@ -407,6 +407,7 @@ static long encode(int score, int srcIdx, int dstIdx) {
| encodeFile(dstIdx);
}
@SuppressWarnings("IntLongMath")
private static long encodeFile(int idx) {
// We invert the index so that the first file in the list sorts
// later in the table. This permits us to break ties favoring
@ -415,6 +416,7 @@ private static long encodeFile(int idx) {
return INDEX_MASK - idx;
}
@SuppressWarnings("IntLongMath")
private static int decodeFile(int v) {
return INDEX_MASK - v;
}