Rest: fixed filters execution order to be from lowest to highest rather than the other way around

Closes #7019
This commit is contained in:
javanna 2014-07-24 18:17:17 +02:00 committed by Luca Cavanna
parent 0e9594e02d
commit 4e5ad568bb
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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());
}
});