Adds cast hint for eclipse

Eclipse errors because the direct supperclass of the two listeners is package private and it doesn’t have the smarts to look higher in the heirarchy. So we need to add a cast hint to force Eclipse to consider the elements as Listeners

Original commit: elastic/x-pack-elasticsearch@a7aff45571
This commit is contained in:
Colin Goodheart-Smithe 2017-02-24 08:38:33 +00:00
parent 615dd0f240
commit 7f6edbdd4b
1 changed files with 4 additions and 3 deletions

View File

@ -18,10 +18,10 @@ import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.component.LifecycleListener;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.xpack.ml.job.retention.ExpiredModelSnapshotsRemover;
import org.elasticsearch.xpack.ml.job.retention.ExpiredResultsRemover;
import org.elasticsearch.xpack.ml.job.persistence.AnomalyDetectorsIndex;
import org.elasticsearch.xpack.ml.job.persistence.JobProvider;
import org.elasticsearch.xpack.ml.job.retention.ExpiredModelSnapshotsRemover;
import org.elasticsearch.xpack.ml.job.retention.ExpiredResultsRemover;
import org.elasticsearch.xpack.ml.notifications.Auditor;
import java.util.Arrays;
@ -164,7 +164,8 @@ public class MlInitializationService extends AbstractComponent implements Cluste
private void installDailyManagementService() {
if (mlDailyManagementService == null) {
mlDailyManagementService = new MlDailyManagementService(threadPool, Arrays.asList(
mlDailyManagementService = new MlDailyManagementService(threadPool,
Arrays.asList((MlDailyManagementService.Listener)
new ExpiredResultsRemover(client, clusterService, jobId -> jobProvider.audit(jobId)),
new ExpiredModelSnapshotsRemover(client, clusterService)
));