Skip to content

Partial Java 25 support for TinkerPop 3.8.x#3488

Open
porunov wants to merge 1 commit into
apache:3.8-devfrom
porunov:java-25-support
Open

Partial Java 25 support for TinkerPop 3.8.x#3488
porunov wants to merge 1 commit into
apache:3.8-devfrom
porunov:java-25-support

Conversation

@porunov

@porunov porunov commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Add partial support for building and running with Java 25.
All modules except spark-gremlin become compatible with Java 25.

This may potentially help graph providers that don't use spark-gremlin to upgrade to Java 25.
Providers that do require spark-gremlin will not be able to upgrade to Java 25 on TinkerPop 3.x versions. Full Java 25 upgrade requires dropping Java 11 support. You can find full Java 25 upgrade in PR #3489 which targets TinkerPop 4.0.0.
The reason Spark can't be upgraded to the newer version on 3.8-dev branch is because there are no Spark versions available that are compatible with both Java 11 and Java 25. New Spark versions require minimum Java 17.

There was the first attempt to add Java 25 support in the PR #3283
This PR can be considered as continuation

@codecov-commenter

codecov-commenter commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (3.8-dev@2ca64b0). Learn more about missing BASE report.

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             @@
##             3.8-dev    #3488   +/-   ##
==========================================
  Coverage           ?   76.47%           
  Complexity         ?    14906           
==========================================
  Files              ?     1160           
  Lines              ?    72214           
  Branches           ?     8070           
==========================================
  Hits               ?    55226           
  Misses             ?    14055           
  Partials           ?     2933           

☔ 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.

Update Groovy to 4.0.32 (which bundles a version of ASM that can parse
Java 25 class files) and make the other changes required to build, test,
and run TinkerPop on Java 25:

- pom.xml: bump groovy.version to 4.0.32 and widen the enforcer
  requireJavaVersion range to [11,26)
- StringFactory: detect the Java 21+ lambda class name format
  ($$Lambda/0x...) so a step's toString() renders "lambda" consistently
- LambdaRestrictionStrategy: match "lambda" case-insensitively
- gremlin-groovy and gremlin-archetype-dsl: declare annotationProcessorPaths
  explicitly because, as of JDK 23, javac no longer runs annotation
  processors that are only discovered on the classpath (GremlinDslProcessor)
- gremlin-groovy: activate the javadoc groovy-stubs sourcepath profile for
  all JDK 11 and newer instead of only 11-17
- gremlin-console: apply the neo4j-gremlin --add-opens flags for JDK 17+
- ImportGremlinPluginTest: account for Math.TAU added in Java 19
- build-test.yml: add a Java 25 build job

Also bump Hadoop to 3.4.3 so hadoop-gremlin builds and runs on Java 25.
Hadoop 3.3.3 fails on Java 25 because UserGroupInformation calls
Subject.getSubject(), which throws UnsupportedOperationException now that
the Security Manager has been removed. Hadoop 3.4.3 migrated to the
replacement APIs (HADOOP-19212):

- pom.xml: hadoop.version 3.3.3 -> 3.4.3; kerby.version 2.0.1 -> 2.0.3 to
  match the Kerby version Hadoop 3.4.3 ships; pin wildfly-common (pulled in
  transitively by the Kerby test KDC) to satisfy dependency convergence
- gremlin-test: exclude jline from kerb-simplekdc (only used by the unused
  kadmin CLI) to avoid a clash with the jline from Hadoop's yarn client
- hadoop-gremlin: bump nimbus-jose-jwt to 9.30.1 to match Kerby 2.0.3
- spark-gremlin: align Netty (via netty-bom) and metrics-core and bump
  curator-recipes, since Spark 3.3.2 and Hadoop 3.4.3 ship different
  versions of these
- build-test.yml: include hadoop-gremlin in the Java 25 job; only
  spark-gremlin remains excluded

spark-gremlin stays on Spark 3.3.2 and is built and tested with Java 11 and
17 only. The only Spark releases that support Java 25 (4.1+) require Java 17
as a minimum and Scala 2.13, which would drop Java 11 support for the
module.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
@porunov porunov force-pushed the java-25-support branch from 53cc694 to 291b499 Compare July 2, 2026 18:04
@porunov porunov marked this pull request as ready for review July 2, 2026 18:15
@porunov porunov changed the title Java 25 support Partial Java 25 support for TinkerPop 3.8.x Jul 2, 2026
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