Skip to content

Load sun.internal.new[Class].jar directly to fix CI test failures#1101

Merged
timtebeek merged 1 commit into
mainfrom
tim/fix-issue-1100
May 15, 2026
Merged

Load sun.internal.new[Class].jar directly to fix CI test failures#1101
timtebeek merged 1 commit into
mainfrom
tim/fix-issue-1100

Conversation

@timtebeek
Copy link
Copy Markdown
Member

@timtebeek timtebeek commented May 15, 2026

Summary

Test plan

  • ./gradlew test --tests "org.openrewrite.java.migrate.IBMSemeruTest" --tests "org.openrewrite.java.migrate.InternalBindPackagesTest" passes locally
  • Scheduled CI run no longer reports the four IBMSemeruTest failures

`classpathFromResources("sun.internal.new")` uses
`Pattern.compile(artifactName + ".*")` to match against artifact-version
strings in both `META-INF/rewrite/classpath.tsv.gz` type tables and
JAR files under `META-INF/rewrite/classpath/`. Since `.` is a regex
wildcard, the prefix `sun.internal.new` can match unrelated artifacts,
and the static `TypeTable.classesDirByArtifact` cache can cause the
local JAR fallback to be skipped depending on test ordering and what
type tables happen to be on the runtime classpath.

After #1096 routed Maven resolution through Moderne's Artifactory
cache mirror, the four type-attribution-sensitive `IBMSemeruTest`
cases started failing on every scheduled CI run with "LST contains
missing or invalid type information". Loading the JAR directly via
`classpath(Collection<Path>)` and a `getResource` lookup bypasses
both the regex matching and the shared static cache, so the IBM
JSSE stub classes are always available to the parser.

Fixes #1100
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite May 15, 2026
@timtebeek timtebeek merged commit dd5e0dc into main May 15, 2026
1 check passed
@timtebeek timtebeek deleted the tim/fix-issue-1100 branch May 15, 2026 21:58
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

IBMSemeruTest: 4 tests fail in scheduled CI with 'LST contains missing or invalid type information' since Moderne Artifactory mirror was enabled

1 participant