Weld 4.0.1.Final
First maintainance release of Weld 4 is now available along with API version 4.0.SP1.
The crux of this release is (much like 3.1.7.Final) a rework of Weld’s default class defining capabilities. With 4.0.1.Final you should no longer see illegal reflective access warning so long as you are on JDK 11 or newer. More details on this are below or in the respective JIRA ticket; in case you encounter any issue with it, please don’t hesitate to reach out to us.
So, let’s take a closer look:
-
Class Defining in Weld
-
Weld Core is now a Multi-Release JAR providing two different implementations for JDK 8 and JDK 11 or newer
-
Integrators are still encouraged to implement
ProxyServicesclass from our API-
All implementations of this interface are now presumed to support class defining (
ProxyServices#supportsClassDefining()is now deprecated and not used)
-
-
For SE environment or an integrator that doesn’t implement the aforementioned API, Weld now provides a default implementation of
ProxyServiceswhich:-
On JDK 8 behaves the same as it did until now - it cracks open
ClassLoader.defineClass(…)method and uses that -
On JDK 11+ it uses a combination of
MethodHandles.Lookupand a customClassLoader; the former is used for vast majority of cases with class loader being a solution for edge cases such as default packages or beans from signed JARs
-
-
-
Other Weld Core Fixes
-
BeanAttributesConfiguratorcould incorrectly initialize default qualifiers when@Namedwas involved (WELD-2659) -
Synthetic alternative beans did not trigger
ProcessBeanevent as they should when enabled (WELD-2658) -
Fixed proxy creation for beans in default package (WELD-2657)
-
Fixed a corner case scenario where a hierarchy of classes with bridge methods would not get correctly intercepted (WELD-2656)
-
ProxyFactorynow creates determininistic proxy names (WELD-2618) -
Decorators for interfaces with non-decorated default method now work properly (WELD-2647)
-
WildFly Patch
There is no WildFly patch at the moment. We are currently exploring how to properly ship a patch that would align with WildFly usage of Galleon; the tracking JIRA can be seen (here).
[ Download ] [ Documentation ] [ Release notes ]