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 eceb889 Pin Mock JDK 11 in Grails test harness for 2026.2
eceb889 is described below
commit eceb889feafdc4b67e29decd2b870f0351a57b8d
Author: James Daugherty <[email protected]>
AuthorDate: Sat Jul 18 23:39:17 2026 -0400
Pin Mock JDK 11 in Grails test harness for 2026.2
Since IntelliJ 2026.2, the legacy filesystem Mock JDK 1.7 that
DefaultLightProjectDescriptor uses by default is no longer shipped with the
platform distribution (only mock JDKs with feature version > 9 are
provisioned
from the artifacts repository). With an empty JDK, java.lang.*/java.util.*
did
not resolve in the light-fixture module, so domain-class field types
collapsed
and a large swath of resolution/highlighting/completion tests failed.
Pin the descriptor to Mock JDK 11 via its SDK supplier.
Reduces test failures from 168 to 26 (970 total).
---
.../src/org/jetbrains/plugins/groovy/grails/GrailsTestCase.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/testFramework/src/org/jetbrains/plugins/groovy/grails/GrailsTestCase.java
b/testFramework/src/org/jetbrains/plugins/groovy/grails/GrailsTestCase.java
index 8c31872..f0047c8 100644
--- a/testFramework/src/org/jetbrains/plugins/groovy/grails/GrailsTestCase.java
+++ b/testFramework/src/org/jetbrains/plugins/groovy/grails/GrailsTestCase.java
@@ -249,7 +249,11 @@ public abstract class GrailsTestCase extends
LightJavaCodeInsightFixtureTestCase
@NotNull
@Override
protected LightProjectDescriptor getProjectDescriptor() {
- return new DefaultLightProjectDescriptor() {
+ // Since IntelliJ 2026.2 the legacy filesystem Mock JDK 1.7 (used by
DefaultLightProjectDescriptor
+ // by default) no longer exists: mock JDKs with feature <= 9 resolve to a
filesystem path that is
+ // not shipped with the platform distribution, so java.lang.*/java.util.*
become unresolvable.
+ // Mock JDK 11+ is resolved from the artifacts repository instead, so pin
it explicitly.
+ return new DefaultLightProjectDescriptor(IdeaTestUtil::getMockJdk11) {
@Override
public void configureModule(@NotNull Module module, @NotNull
ModifiableRootModel model, @NotNull ContentEntry contentEntry) {
super.configureModule(module, model, contentEntry);