[jboss-jira] [JBoss JIRA] (WFLY-11066) Incorrect >= 3.1 conditional in JspInitializationListener
Jan Stourac (JIRA)
issues at jboss.org
Tue Sep 25 08:09:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-11066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13638054#comment-13638054 ]
Jan Stourac commented on WFLY-11066:
------------------------------------
I've just checked that tests prepared for WFLY-11065 successfully passed when your fix is incorporated. I am gonna mark this jira as a duplicate of WFLY-11065 as that one has already JBEAP clone and also to have it all tracked on one place. Thanks! :)
> Incorrect >= 3.1 conditional in JspInitializationListener
> ---------------------------------------------------------
>
> Key: WFLY-11066
> URL: https://issues.jboss.org/browse/WFLY-11066
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Reporter: Peter Palaga
> Assignee: Peter Palaga
>
> In {{JspInitializationListener}} there is a comment saying
> {quote}
> if the servlet version is 3.1 or higher, setup a ELResolver which allows usage of static fields java.lang.*
> {quote}
> However the conditional following the comment is not testing for "3.1 or higher":
> {code}
> if (servletContext.getEffectiveMajorVersion() >= 3 && servletContext.getEffectiveMinorVersion() >= 1) {
> {code}
> note that e.g. for 4.0 the expression is false
> To include 4.0, the expression should be something like
> {code}
> if (servletContext.getEffectiveMajorVersion() > 3 || (servletContext.getEffectiveMajorVersion() == 3 && servletContext.getEffectiveMinorVersion() >= 1)) {
> {code}
> [1] https://github.com/wildfly/wildfly/blob/e8724d5e539ac26b402a5ad10ef3d98839c7497c/undertow/src/main/java/org/wildfly/extension/undertow/deployment/JspInitializationListener.java#L50
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list