From 76cd7b1eb2cf7f87081c24ae6362ae1d9dec6100 Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Tue, 18 Apr 2017 12:50:05 +0100 Subject: [PATCH] Fixes compile errors in Eclipse due to generics PersistentTasksCustomMetadata was using a generic param named `Params`. This conflicted with the imported interface `ToXContent.Params`. The java compiler was preferring the generic param over the interface so everything was fine but Eclipse apparently prefers the interface int his case which was screwing up the Hierarchy and causing compile errors in Eclipse. This changes fixes it by renaming the Generic param to `P` --- .../PersistentTasksCustomMetaData.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java b/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java index 7dfccfdddd3..c24dd6c1b28 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java +++ b/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetaData.java @@ -266,12 +266,12 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable implements Writeable, ToXContent { + public static class PersistentTask

implements Writeable, ToXContent { private final String id; private final long allocationId; private final String taskName; @Nullable - private final Params params; + private final P params; @Nullable private final Status status; private final Assignment assignment; @@ -279,21 +279,21 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable task, long allocationId, Assignment assignment) { + public PersistentTask(PersistentTask

task, long allocationId, Assignment assignment) { this(task.id, allocationId, task.taskName, task.params, task.status, assignment, task.allocationId); } - public PersistentTask(PersistentTask task, Status status) { + public PersistentTask(PersistentTask

task, Status status) { this(task.id, task.allocationId, task.taskName, task.params, status, task.assignment, task.allocationId); } - private PersistentTask(String id, long allocationId, String taskName, Params params, + private PersistentTask(String id, long allocationId, String taskName, P params, Status status, Assignment assignment, Long allocationIdOnLastStatusUpdate) { this.id = id; this.allocationId = allocationId; @@ -321,7 +321,7 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable