Fix some type checks that were always false (#27706)
* CustomFieldQuery: removed a redundant type check that was already done higher up in the same if/else chain. * PrioritizedEsThreadPoolExecutor: removed a check that was simply a duplicate of one earlier one and would never have been true.
This commit is contained in:
parent
87313e12ba
commit
85dd1880fc
|
@ -75,9 +75,6 @@ public class CustomFieldQuery extends FieldQuery {
|
|||
} else if (sourceQuery instanceof BlendedTermQuery) {
|
||||
final BlendedTermQuery blendedTermQuery = (BlendedTermQuery) sourceQuery;
|
||||
flatten(blendedTermQuery.rewrite(reader), reader, flatQueries, boost);
|
||||
} else if (sourceQuery instanceof ESToParentBlockJoinQuery) {
|
||||
ESToParentBlockJoinQuery blockJoinQuery = (ESToParentBlockJoinQuery) sourceQuery;
|
||||
flatten(blockJoinQuery.getChildQuery(), reader, flatQueries, boost);
|
||||
} else if (sourceQuery instanceof BoostingQuery) {
|
||||
BoostingQuery boostingQuery = (BoostingQuery) sourceQuery;
|
||||
//flatten positive query with query boost
|
||||
|
|
|
@ -137,7 +137,7 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
|
|||
@Override
|
||||
protected Runnable wrapRunnable(Runnable command) {
|
||||
if (command instanceof PrioritizedRunnable) {
|
||||
if ((command instanceof TieBreakingPrioritizedRunnable)) {
|
||||
if (command instanceof TieBreakingPrioritizedRunnable) {
|
||||
return command;
|
||||
}
|
||||
Priority priority = ((PrioritizedRunnable) command).priority();
|
||||
|
@ -145,9 +145,6 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
|
|||
} else if (command instanceof PrioritizedFutureTask) {
|
||||
return command;
|
||||
} else { // it might be a callable wrapper...
|
||||
if (command instanceof TieBreakingPrioritizedRunnable) {
|
||||
return command;
|
||||
}
|
||||
return new TieBreakingPrioritizedRunnable(super.wrapRunnable(command), Priority.NORMAL, insertionOrder.incrementAndGet());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue