From d9d5be5eeeef57d2acdea669093139766cb8508b Mon Sep 17 00:00:00 2001 From: KingSimon <19822231+KingOfSquares@users.noreply.github.com> Date: Sat, 16 Apr 2022 15:19:00 +0200 Subject: [PATCH] Use generics instead of wildcards Signed-off-by: KingSimon <19822231+KingOfSquares@users.noreply.github.com> --- .../main/java/tc/oc/pgm/api/filter/query/GoalQuery.java | 4 ++-- .../src/main/java/tc/oc/pgm/filters/query/GoalQuery.java | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/tc/oc/pgm/api/filter/query/GoalQuery.java b/core/src/main/java/tc/oc/pgm/api/filter/query/GoalQuery.java index a46f8dc1ff..5611d9a225 100644 --- a/core/src/main/java/tc/oc/pgm/api/filter/query/GoalQuery.java +++ b/core/src/main/java/tc/oc/pgm/api/filter/query/GoalQuery.java @@ -3,6 +3,6 @@ import tc.oc.pgm.goals.Goal; import tc.oc.pgm.goals.GoalDefinition; -public interface GoalQuery extends MatchQuery { - Goal getGoal(); +public interface GoalQuery extends MatchQuery { + Goal getGoal(); } diff --git a/core/src/main/java/tc/oc/pgm/filters/query/GoalQuery.java b/core/src/main/java/tc/oc/pgm/filters/query/GoalQuery.java index 7c1bd52125..f1eb34b143 100644 --- a/core/src/main/java/tc/oc/pgm/filters/query/GoalQuery.java +++ b/core/src/main/java/tc/oc/pgm/filters/query/GoalQuery.java @@ -3,16 +3,17 @@ import tc.oc.pgm.goals.Goal; import tc.oc.pgm.goals.GoalDefinition; -public class GoalQuery extends MatchQuery implements tc.oc.pgm.api.filter.query.GoalQuery { - private final Goal goal; +public class GoalQuery extends MatchQuery + implements tc.oc.pgm.api.filter.query.GoalQuery { + private final Goal goal; - public GoalQuery(Goal goal) { + public GoalQuery(Goal goal) { super(null, goal.getMatch()); this.goal = goal; } @Override - public Goal getGoal() { + public Goal getGoal() { return this.goal; } }