Skip to content

MYFACES-4760 QuarkusApplication.getELResolver() introduces data race - #1042

Merged
tandraschko merged 1 commit into
apache:4.1.xfrom
kassapo:4.1.x
Aug 12, 2026
Merged

MYFACES-4760 QuarkusApplication.getELResolver() introduces data race#1042
tandraschko merged 1 commit into
apache:4.1.xfrom
kassapo:4.1.x

Conversation

@kassapo

@kassapo kassapo commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

QuarkusApplication.getELResolver() first sets (and exposes) the instance variable and only then calls the resolver builder. The builder is not thread-safe. Thus concurrent requests can access an empty slot in the builder's internal array.

Now using Lazy just as ApplicationImpl does.

Fixes:
jakarta.el.ELException: java.lang.NullPointerException: Cannot invoke
"jakarta.el.ELResolver.convertToType(...)" because "this.elResolvers[i]" is null
at jakarta.el.ELContext.convertToType(ELContext.java:435)
at org.glassfish.expressly.lang.EvaluationContext.convertToType(EvaluationContext.java:141)
at org.glassfish.expressly.ValueExpressionImpl.getValue(ValueExpressionImpl.java:142)
at org.apache.myfaces.application.ApplicationImpl.evaluateExpressionGet(ApplicationImpl.java:515)
...
Caused by: java.lang.NullPointerException: ... "this.elResolvers[i]" is null
at jakarta.el.CompositeELResolver.convertToType(CompositeELResolver.java:446)

QuarkusApplication.getELResolver() first sets (and exposes) the instance variable
and only then calls the resolver builder. The builder is not thread-safe. Thus
concurrent requests can access an empty slot in the builder's internal array.

Now using Lazy just as ApplicationImpl does.

Fixes:
 jakarta.el.ELException: java.lang.NullPointerException: Cannot invoke
 "jakarta.el.ELResolver.convertToType(...)" because "this.elResolvers[i]" is null
     at jakarta.el.ELContext.convertToType(ELContext.java:435)
     at org.glassfish.expressly.lang.EvaluationContext.convertToType(EvaluationContext.java:141)
     at org.glassfish.expressly.ValueExpressionImpl.getValue(ValueExpressionImpl.java:142)
     at org.apache.myfaces.application.ApplicationImpl.evaluateExpressionGet(ApplicationImpl.java:515)
     ...
 Caused by: java.lang.NullPointerException: ... "this.elResolvers[i]" is null
     at jakarta.el.CompositeELResolver.convertToType(CompositeELResolver.java:446)
@tandraschko
tandraschko merged commit 32c0f67 into apache:4.1.x Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants