From bb07f9657383b58e804bc2d8bc0dcd78df9b9de5 Mon Sep 17 00:00:00 2001 From: Mikhail Pyltsin Date: Thu, 10 Oct 2024 18:11:56 +0200 Subject: [PATCH] [groovy] IDEA-327339 convert groovy classes to java - fix small issues GitOrigin-RevId: c7dd99229e4112089419ab83e3702f3de8f71a99 --- .../plugins/groovy/ext/spock/SpockLineMarkersTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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();