Skip to content

Support Java 25 and Spark 4.1, raise minimum to Java 17#3489

Open
porunov wants to merge 1 commit into
apache:masterfrom
porunov:java-25-spark4
Open

Support Java 25 and Spark 4.1, raise minimum to Java 17#3489
porunov wants to merge 1 commit into
apache:masterfrom
porunov:java-25-spark4

Conversation

@porunov

@porunov porunov commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Modernizes TinkerPop 4.0 to build and run on Java 25 and upgrades the Spark OLAP integration to Spark 4.1. Because Spark 4 requires Java 17 as a minimum, the project-wide minimum Java version is raised from 11 to 17.

Java 25 support:

  • Groovy 4.0.25 -> 4.0.32 (bundled ASM parses Java 25 bytecode)
  • StringFactory: detect the Java 21+ lambda class name format ($$Lambda/)
  • LambdaRestrictionStrategy: match "lambda" case-insensitively
  • ImportGremlinPluginTest: account for Math.TAU added in Java 19
  • gremlin-groovy: declare annotationProcessorPaths explicitly (JDK 23+ no longer runs classpath-discovered processors) and widen the javadoc groovy-stubs profile to all supported JDKs
  • gremlin-console: apply the neo4j-gremlin --add-opens flags for JDK 17+

Dependency upgrades:

  • Hadoop 3.4.2 -> 3.4.3 (uses the Subject.current()/callAs() replacement APIs, so hadoop-gremlin runs on Java 25)
  • Spark 3.5.4 -> 4.1.2, which is Scala 2.13 only and the first Spark line to support Java 25. Switched spark-core_2.12 -> _2.13, ported the Scala 2.13 changes (JavaConversions -> CollectionConverters, WrappedArray -> immutable ArraySeq) and aligned Netty, jackson (via jackson-bom) and other transitive versions that Spark 4 requires
  • Netty 4.1.125 -> 4.2.7 (required by Spark 4)

Java 17 baseline (breaking):

  • enforcer requireJavaVersion [11,18) -> [17,26); compiler release 11 -> 17 (and gremlin-groovy/gremlin-annotations release 8 -> 17)
  • build-test.yml: all jobs run on Java 17, plus a new Java 25 job; the Java 11 job is removed and coverage runs on the Java 17 job
  • Dockerfiles and developer docs updated to Java 17

Validated with a full mvn clean install on both Java 17 and Java 25 (all JVM modules, including hadoop-gremlin and spark-gremlin).

@porunov porunov mentioned this pull request Jun 29, 2026
@codecov-commenter

codecov-commenter commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.13%. Comparing base (a28cd1f) to head (fc9d33a).
⚠️ Report is 161 commits behind head on master.

Files with missing lines Patch % Lines
...inkerpop/gremlin/structure/util/StringFactory.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3489      +/-   ##
============================================
- Coverage     76.35%   76.13%   -0.23%     
- Complexity    13424    13682     +258     
============================================
  Files          1012     1029      +17     
  Lines         60341    61923    +1582     
  Branches       7075     7231     +156     
============================================
+ Hits          46076    47146    +1070     
- Misses        11548    11881     +333     
- Partials       2717     2896     +179     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Modernizes TinkerPop 4.0 to build and run on Java 25 and upgrades the Spark
OLAP integration to Spark 4.1. Because Spark 4 requires Java 17 as a minimum,
the project-wide minimum Java version is raised from 11 to 17.

Java 25 support:
- Groovy 4.0.25 -> 4.0.32 (bundled ASM parses Java 25 bytecode)
- StringFactory: detect the Java 21+ lambda class name format ($$Lambda/)
- LambdaRestrictionStrategy: match "lambda" case-insensitively
- ImportGremlinPluginTest: account for Math.TAU added in Java 19
- gremlin-groovy: declare annotationProcessorPaths explicitly (JDK 23+ no
  longer runs classpath-discovered processors) and widen the javadoc
  groovy-stubs profile to all supported JDKs
- gremlin-console: apply the neo4j-gremlin --add-opens flags for JDK 17+

Dependency upgrades:
- Hadoop 3.4.2 -> 3.4.3 (uses the Subject.current()/callAs() replacement APIs)
- Spark 3.5.4 -> 4.1.2, which is Scala 2.13 only and the first Spark line to
  support Java 25: spark-core_2.12 -> _2.13, Scala 2.13 source migration
  (JavaConversions -> CollectionConverters, WrappedArray -> immutable
  ArraySeq), and aligned Netty, jackson (via jackson-bom) and other transitive
  versions that Spark 4 requires
- Netty 4.1.125 -> 4.2.7 (required by Spark 4)

Java 17 baseline (breaking):
- enforcer requireJavaVersion [11,18) -> [17,26); compiler release 11 -> 17
  (and gremlin-groovy/gremlin-annotations release 8 -> 17)
- build-test.yml: all jobs run on Java 17, plus a new Java 25 job; the Java 11
  job is removed and coverage runs on the Java 17 job
- Dockerfiles and developer docs updated to Java 17

Integration-test fixes for the Java 17 baseline (deep reflection into java.base
is denied by default on Java 17, and TLS 1.3 is the default):
- gremlin-server.sh: append the jdk17 --add-opens/--add-exports set to
  JAVA_OPTIONS so the standalone/Docker server can perform the deep reflection
  Kryo/Gryo needs
- GremlinServerSslIntegrateTest: accept the alerts Java 17's TLS 1.3 raises for
  a missing/untrusted client certificate
- gremlin-socket-server and gremlin-console test Docker images use Java 17

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants