-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
This is a proposal for a kind of hack.
Assume undertow-servlet has been bytecode transformed to use jakarta servlet APIs instead of the javax it was compiled against. This transformation could happen either during its own build or later, as WildFly Preview's wildfly-preview-feature-pack does when it provisions artifacts using javax.
Such an undertow will work fine as a EE 9 Servlet implementation, except it reports the wrong servlet major version as the code hard codes '4'. A server using this cannot pass the EE 9 TCK.
Proposed hack is to add a static initializer to the DeploymentInfo class that provides that '4'. Look at the java.lang.Package for one of the Servlet API classes it already uses. If the package name starts with 'jakarta' it knows it has been transformed and should report '5' not '4'.
- relates to
-
WFLY-14012 servlet/api/jakarta_servlet/servletcontext/URLClient.java#GetMajorVersionTest fails due to incorrect Major Servlet API SPEC version `4` being returned instead of expected `5`
- Closed