Skip to content

vietk/QuarkusReproducer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resolver-issue

This repository is a reproducer for an unexpected behavior of the Quarkus RunnerClassLoader

Problem statement

I want to load classes as resource from the class loader and For that I am reusing org.springframework.core.io.support.PathMatchingResourcePatternResolver. Unfortunately when using the one of the production classloader of Quarkus, the RunnerClassLoader, this latter do not manage to load the resource effectivelly, as opposed to the System classloader or the dev mode QuarkusClassLoader.

When loading a path resource, the classloader is stripping the last \ from the resource

When loading the path org/acme/ with RunnerClassLoader :

URL [jar:file:/User/Projects/Support/Misc/Quarkus/resolver-issue/target/quarkus-app/app/resolver-issue-1.0.0-SNAPSHOT.jar!/org/acme]

When loading the same path with QuarkusClassLoader

URL [file:/User/Projects/Support/Misc/Quarkus/resolver-issue/target/classes/org/acme/]

This is the same kind of issue that has been reported and fixed for the QuarkusClassLoader

How to use

There are 3 tests that test the same thing: try to extract a class from a package and see if the resource is returned by the org.springframework.core.io.support.PathMatchingResourcePatternResolver

  • JUnit test is it's working (System classloader)
  • QuarkusTest is working (QuarkusClassLoader)
  • quarkus-runner-app.jar is failing (RunnerClassLoader)

To reproduce

mvn verify
launch `./src/test/shell/test.sh`

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published