diff --git a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/classloading/ClassLoaderLimiter.java b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/classloading/ClassLoaderLimiter.java index 855b0ebde321e..7c4d115e50e17 100644 --- a/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/classloading/ClassLoaderLimiter.java +++ b/independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/classloading/ClassLoaderLimiter.java @@ -10,8 +10,8 @@ public final class ClassLoaderLimiter implements ClassLoaderEventListener { //Store which classloader (by name) has loaded each resource as it helps diagnostics - private final ConcurrentMap atMostOnceResourcesLoaded = new ConcurrentHashMap(); - private final ConcurrentMap allResourcesLoaded = new ConcurrentHashMap(); + private final ConcurrentMap atMostOnceResourcesLoaded = new ConcurrentHashMap<>(); + private final ConcurrentMap allResourcesLoaded = new ConcurrentHashMap<>(); private final Set vetoedResources; private final Set vetoedClasses; @@ -96,7 +96,7 @@ private Builder() { * List a resource name as one that you don't expect to be loaded ever. * If there is an attempt of loading the matched resource, a runtime exception will be thrown instead: * useful for running integration tests to verify your assumptions. - * + *

* Limitations: if the resource is being loaded using the bootstrap classloader we * can't check it; some frameworks explicitly request using the base classloader * for resource loading (or even use the Filesystem API), so they can't be tested via this method. @@ -122,10 +122,10 @@ public Builder neverLoadedResource(String resourceFullName) { * List a fully qualified class name as one that you don't expect to be loaded ever. * If there is an attempt of loading the matched class, a runtime exception will be thrown instead: * useful for running integration tests to verify your assumptions. - * + *

* DO NOT list the name by doing using literal.class.getName() as this will implicitly get you * to load the class during the test, and produce a failure. - * + *

* Limitations: if the class is being loaded using the bootstrap classloader we * can't check it. Most Quarkus extensions and frameworks will not use the bootstrap classloader, * but some code could make use of it explicitly. @@ -146,10 +146,10 @@ public Builder neverLoadedClassName(String vetoedClassName) { * List a fully qualified class name as one that you don't expect to be loaded at runtime. * If there is an attempt of loading the matched class, a runtime exception will be thrown instead: * useful for running integration tests to verify your assumptions. - * + *

* DO NOT list the name by doing using literal.class.getName() as this will implicitly get you * to load the class during the test, and produce a failure. - * + *

* Limitations: if the class is being loaded using the bootstrap classloader we * can't check it. Most Quarkus extensions and frameworks will not use the bootstrap classloader, * but some code could make use of it explicitly. @@ -170,7 +170,7 @@ public Builder neverLoadedRuntimeClassName(String vetoedClassName) { * Useful to check that a resource is being loaded only once, or never. * If there is an attempt of loading the matched resource more than once, a runtime exception will be thrown instead: * useful for running integration tests to verify your assumptions. - * + *

* Limitations: if the resource is being loaded using the bootstrap classloader we * can't check it; some frameworks explicitly request using the base classloader * for resource loading (or even use the Filesystem API), so they can't be tested via this method.