Remove useless comparison test

The result of certain comparison tests can sometimes be inferred
from their context and the results of other comparisons. Inspect
the code to check whether the logic is correct, and consider
simplifying the logical expression.

Signed-off-by: Thibault Meyer <meyer.thibault@gmail.com>
This commit is contained in:
Thibault Meyer
2019-04-28 12:10:56 +02:00
parent 4bedefa494
commit c5d761076a
3 changed files with 6 additions and 14 deletions
@@ -48,10 +48,8 @@ class CQueryPlanRawSql extends CQueryPlan {
// an associated bean is in the raw SQL but is mapped columnIgnore
for (int i = 0; i < indexPositions.length; i++) {
if (indexPositions[i] == 0) {
if (i < indexPositions.length) {
// expect discriminator column to immediately proceed id column
indexPositions[i] = indexPositions[i + 1] - 1;
}
// expect discriminator column to immediately proceed id column
indexPositions[i] = indexPositions[i + 1] - 1;
}
}