This is an automated email from the ASF dual-hosted git repository.
jdaugherty pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/grails-intellij-plugin.git
The following commit(s) were added to refs/heads/main by this push:
new 9a21a4b Add a JDK to heavy-fixture tests on 2026.2
9a21a4b is described below
commit 9a21a4b44b3a6099537d1fc0058772e7bbeb4b57
Author: James Daugherty <[email protected]>
AuthorDate: Sun Jul 19 13:14:28 2026 -0400
Add a JDK to heavy-fixture tests on 2026.2
Since IntelliJ 2026.2 the heavy fixture (JavaModuleFixtureBuilder) module
gets no
JDK: the default Mock JDK 1.7 is no longer shipped, so java.lang.* does not
resolve.
This broke GspTagReferenceCompletionTest (taglib-namespace completion
returned
nothing because TagLibNamespaceDescriptor.getDummyClassVariable() could not
find
java.lang.Object, and Object-derived variants like the class property and
getClass
were missing) and GrailsSpringIntegrationTest (String unresolved during
Spring
autowiring analysis).
Add moduleBuilder.addJdk(System.getProperty("java.home")) in
GspTagReferenceCompletionTest.tuneFixture and HddGrailsTestCase.tuneFixture.
IdeaTestUtil.getMockJdk11() cannot be used there: tuneFixture runs before
the test
application exists and it NPEs.
Full suite is now green: 970 tests, 0 failures (down from 238 after the
2026.2
platform bump).
---
.../groovy/grails/completion/GspTagReferenceCompletionTest.java | 5 +++++
.../src/org/jetbrains/plugins/groovy/grails/HddGrailsTestCase.java | 3 +++
2 files changed, 8 insertions(+)
diff --git
a/test/org/jetbrains/plugins/groovy/grails/completion/GspTagReferenceCompletionTest.java
b/test/org/jetbrains/plugins/groovy/grails/completion/GspTagReferenceCompletionTest.java
index e644d26..cdfe215 100644
---
a/test/org/jetbrains/plugins/groovy/grails/completion/GspTagReferenceCompletionTest.java
+++
b/test/org/jetbrains/plugins/groovy/grails/completion/GspTagReferenceCompletionTest.java
@@ -36,6 +36,11 @@ public class GspTagReferenceCompletionTest extends
CompletionTestBase {
@Override
protected void tuneFixture(JavaModuleFixtureBuilder fixtureBuilder) {
+ // Since 2026.2 the heavy fixture's default Mock JDK 1.7 is no longer
shipped, so the module has
+ // no JDK: java.lang.Object is unresolvable, which silently disables
taglib-namespace completion
+ // (TagLibNamespaceDescriptor.getDummyClassVariable returns null) and
drops Object-derived
+ // variants (class property, getClass). Use the JDK running the tests.
+ fixtureBuilder.addJdk(System.getProperty("java.home"));
fixtureBuilder.addLibraryJars("GRAILS",
GrailsTestUtil.getMockGrails11LibraryHome(), "/dist/grails-web-1.3.1.jar");
fixtureBuilder.addLibrary("GROOVY",
GrailsTestUtil.getMockGrailsLibraryHome() + '/' + TestUtils.GROOVY_JAR);
fixtureBuilder.addLibraryJars("Grails",
GrailsTestUtil.getMockGrails11LibraryHome(), "/dist/grails-core-1.3.1.jar");
diff --git
a/testFramework/src/org/jetbrains/plugins/groovy/grails/HddGrailsTestCase.java
b/testFramework/src/org/jetbrains/plugins/groovy/grails/HddGrailsTestCase.java
index f087420..8e23862 100644
---
a/testFramework/src/org/jetbrains/plugins/groovy/grails/HddGrailsTestCase.java
+++
b/testFramework/src/org/jetbrains/plugins/groovy/grails/HddGrailsTestCase.java
@@ -73,6 +73,9 @@ public abstract class HddGrailsTestCase extends
JavaCodeInsightFixtureTestCase {
@Override
protected void tuneFixture(JavaModuleFixtureBuilder moduleBuilder) {
+ // Since 2026.2 the heavy fixture's default Mock JDK 1.7 is no longer
shipped, so the module has
+ // no JDK and java.lang.* does not resolve. Use the JDK running the tests.
+ moduleBuilder.addJdk(System.getProperty("java.home"));
moduleBuilder.addLibrary("GROOVY",
GrailsTestUtil.getMockGrailsLibraryHome() + '/' + TestUtils.GROOVY_JAR);
moduleBuilder.addLibraryJars("Grails",
GrailsTestUtil.getMockGrails11LibraryHome(), "/dist/grails-core-1.3.1.jar",
"/dist/grails-web-1.3.1.jar");