Search in sources :

Example 1 with ImplicitObjectELResolver

use of jakarta.servlet.jsp.el.ImplicitObjectELResolver in project tomcat by apache.

the class TestJasperELResolver method doTestConstructor.

private void doTestConstructor(int count) throws Exception {
    List<ELResolver> list = new ArrayList<>();
    for (int i = 0; i < count; i++) {
        list.add(new ImplicitObjectELResolver());
    }
    int adjustedForGraalCount = JspRuntimeLibrary.GRAAL ? count + 1 : count;
    JasperELResolver resolver = new JasperELResolver(list, new StreamELResolverImpl());
    Assert.assertEquals(Integer.valueOf(count), getField("appResolversSize", resolver));
    Assert.assertEquals(STANDARD_RESOLVERS_COUNT + adjustedForGraalCount, ((ELResolver[]) getField("resolvers", resolver)).length);
    Assert.assertEquals(Integer.valueOf(STANDARD_RESOLVERS_COUNT + adjustedForGraalCount), Integer.valueOf(((AtomicInteger) getField("resolversSize", resolver)).get()));
}
Also used : ELResolver(jakarta.el.ELResolver) ImplicitObjectELResolver(jakarta.servlet.jsp.el.ImplicitObjectELResolver) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ImplicitObjectELResolver(jakarta.servlet.jsp.el.ImplicitObjectELResolver) ArrayList(java.util.ArrayList) StreamELResolverImpl(org.apache.el.stream.StreamELResolverImpl)

Aggregations

ELResolver (jakarta.el.ELResolver)1 ImplicitObjectELResolver (jakarta.servlet.jsp.el.ImplicitObjectELResolver)1 ArrayList (java.util.ArrayList)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 StreamELResolverImpl (org.apache.el.stream.StreamELResolverImpl)1