Skip to content

Commit

Permalink
Use List#of method in Autoscaling#getActions
Browse files Browse the repository at this point in the history
This commit replaces a use of Collections#emptyList with List#of as the
preferred approach for collection convenience methods in master.
  • Loading branch information
jasontedor committed Feb 7, 2020
1 parent 5a12e58 commit 97c50a3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.elasticsearch.xpack.autoscaling.action.TransportGetAutoscalingDecisionAction;
import org.elasticsearch.xpack.autoscaling.rest.RestGetAutoscalingDecisionHandler;

import java.util.Collections;
import java.util.List;
import java.util.function.Supplier;

Expand Down Expand Up @@ -64,7 +63,7 @@ public List<Setting<?>> getSettings() {
if (enabled) {
return List.of(new ActionHandler<>(GetAutoscalingDecisionAction.INSTANCE, TransportGetAutoscalingDecisionAction.class));
} else {
return Collections.emptyList();
return List.of();
}
}

Expand Down

0 comments on commit 97c50a3

Please sign in to comment.