Rest: fixed filters execution order to be from lowest to highest rather than the other way around
Closes #7019
This commit is contained in:
parent
0e9594e02d
commit
4e5ad568bb
|
@ -86,7 +86,7 @@ public class RestController extends AbstractLifecycleComponent<RestController> {
|
|||
Arrays.sort(copy, new Comparator<RestFilter>() {
|
||||
@Override
|
||||
public int compare(RestFilter o1, RestFilter o2) {
|
||||
return o2.order() - o1.order();
|
||||
return Integer.compare(o1.order(), o2.order());
|
||||
}
|
||||
});
|
||||
filters = copy;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class RestFilterChainTests extends ElasticsearchTestCase {
|
|||
Collections.sort(restFiltersByOrder, new Comparator<RestFilter>() {
|
||||
@Override
|
||||
public int compare(RestFilter o1, RestFilter o2) {
|
||||
return Integer.compare(o2.order(), o1.order());
|
||||
return Integer.compare(o1.order(), o2.order());
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue