Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fallback to Thread Context Class Loader for resource loading #1969

Merged
merged 1 commit into from
Sep 20, 2023

Commits on Aug 29, 2023

  1. Add fallback to Thread Context Class Loader for resource loading

    This commit adds a fallback to `Thread.currentThread().getContextClassLoader().getResourceAsStream(file)` in the `ClasspathHelper` class.
    
    Previously, if the `ClasspathHelper.class.getResourceAsStream(file)` and `ClassLoader.getSystemResourceAsStream(file)` methods returned `null`, no further attempts were made to load the resource, which caused issues in Quarkus applications in dev mode.
    
    This commit adds an additional fallback to `Thread.currentThread().getContextClassLoader().getResourceAsStream(file)` to improve compatibility with the Quarkus class loading model.
    
    Related Issue: swagger-api#1968
    Simon Democko committed Aug 29, 2023
    Configuration menu
    Copy the full SHA
    77d1241 View commit details
    Browse the repository at this point in the history