Also check thread context classloader in TypeTable.fromClasspath()#6900
Merged
Also check thread context classloader in TypeTable.fromClasspath()#6900
TypeTable.fromClasspath()#6900Conversation
When recipe JARs are loaded via a custom URLClassLoader (e.g. Quarkus), the caller's classloader cannot see their classpath.tsv.gz resources. Now fromClasspath() also searches the thread context classloader, which frameworks set to a classloader with full visibility. Also removes the expired .zip extension fallback (TO-BE-REMOVED 2025-10-31). Fixes #6885
TypeTable.fromClasspath()
timtebeek
approved these changes
Mar 10, 2026
knutwannheden
added a commit
that referenced
this pull request
Mar 10, 2026
PR #6900 accidentally dropped the .zip extension fallback when refactoring fromClasspath() to also check the thread context classloader. Downstream repos like rewrite-feature-flags still package their TypeTable data as classpath.tsv.zip, causing "Unable to find classpath resource dependencies" failures.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TypeTable.fromClasspath()now also searches the thread context classloader (TCCL) in addition to the caller's classloader when looking forclasspath.tsv.gzresourcesURLClassLoader(e.g. in Quarkus), the caller's classloader (AppClassLoader) can't see those JARs' resources — the TCCL canLinkedHashSetto deduplicate when both classloaders see the same resources.zipextension fallback (TO-BE-REMOVED 2025-10-31)Test plan
findsResourcesFromThreadContextClassLoadercreates an isolatedURLClassLoaderwith aclasspath.tsv.gz, sets it as TCCL, and verifiesfromClasspath()finds the resource