From 8be2bdcb777cdb4b9114d0be5fd0d43e532da5b6 Mon Sep 17 00:00:00 2001 From: Donat Csikos Date: Tue, 21 Sep 2021 16:52:54 +0200 Subject: [PATCH] Query models with recommended API This fixes the deprecation warning reported at https://github.com/gradle/gradle/issues/17039. --- .../core/internal/workspace/CompositeModelQuery.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.eclipse.buildship.compat/src/main/java/org/eclipse/buildship/core/internal/workspace/CompositeModelQuery.java b/org.eclipse.buildship.compat/src/main/java/org/eclipse/buildship/core/internal/workspace/CompositeModelQuery.java index 3b728981f..142f7687a 100644 --- a/org.eclipse.buildship.compat/src/main/java/org/eclipse/buildship/core/internal/workspace/CompositeModelQuery.java +++ b/org.eclipse.buildship.compat/src/main/java/org/eclipse/buildship/core/internal/workspace/CompositeModelQuery.java @@ -59,9 +59,9 @@ private void collectRootModels(BuildController controller, GradleBuild build, Ma } if (this.parameter != null) { - models.put(buildPath, controller.getModel(build.getRootProject(), this.modelType, this.parameterType, this.parameter)); + models.put(buildPath, controller.getModel(build, this.modelType, this.parameterType, this.parameter)); } else { - models.put(buildPath, controller.getModel(build.getRootProject(), this.modelType)); + models.put(buildPath, controller.getModel(build, this.modelType)); }