diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/ext/spock/SpockLineMarkersTest.java b/plugins/groovy/test/org/jetbrains/plugins/groovy/ext/spock/SpockLineMarkersTest.java index 314c2963a92d..8b9559d44dad 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/ext/spock/SpockLineMarkersTest.java +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/ext/spock/SpockLineMarkersTest.java @@ -1,10 +1,9 @@ -// Copyright 2000-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package org.jetbrains.plugins.groovy.ext.spock; import com.intellij.codeInsight.TestFrameworks; import com.intellij.testFramework.DumbModeTestUtils; import com.intellij.testFramework.LightProjectDescriptor; -import org.codehaus.groovy.runtime.DefaultGroovyMethods; import org.jetbrains.annotations.NotNull; import org.jetbrains.plugins.groovy.GroovyProjectDescriptors; import org.jetbrains.plugins.groovy.LightGroovyTestCase; @@ -39,7 +38,7 @@ public class SpockLineMarkersTest extends LightGroovyTestCase { map.put("methodWithoutLabels", false); map.put("methodWithAnotherLabel", false); map.put("method with spaces ok", true); - GrTypeDefinition spec = DefaultGroovyMethods.first(file.getTypeDefinitions()); + GrTypeDefinition spec = file.getTypeDefinitions()[0]; for (GrMethod method : spec.getCodeMethods()) { String name = method.getName(); Assertions.assertEquals(map.get(name), TestFrameworks.getInstance().isTestMethod(method)); @@ -60,7 +59,7 @@ public class SpockLineMarkersTest extends LightGroovyTestCase { map.put("methodWithoutLabels", false); map.put("methodWithAnotherLabel", false); map.put("method with spaces ok", true); - GrTypeDefinition spec = DefaultGroovyMethods.first(file.getTypeDefinitions()); + GrTypeDefinition spec = file.getTypeDefinitions()[0]; DumbModeTestUtils.runInDumbModeSynchronously(getProject(), () -> { for (GrMethod method : spec.getCodeMethods()) { String name = method.getName();