Bug 66031 - JasperInitializer not correctly initialized when a Default JspFactory is already defined
Summary: JasperInitializer not correctly initialized when a Default JspFactory is alre...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 10
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 10.0.20
Hardware: PC All
: P2 normal (vote)
Target Milestone: ------
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-25 14:50 UTC by jlmonteiro@apache.org
Modified: 2022-04-25 16:06 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlmonteiro@apache.org 2022-04-25 14:50:24 UTC
An issue as been introduced in JasperInitializer with commit 5e8eb55

When a default JspFactory is already defined the static field defaultFactory in JasperInitializer isn't initialized. It produces a NullPointerException line 108 when setting the poolSize.

This fix enforces a proper initialization even when the default JspFactory is already set.

PR available https://github.com/apache/tomcat/pull/505
Comment 1 Remy Maucherat 2022-04-25 16:06:53 UTC
Ok, the field is gone, and the testcase is integrated. Sorry for the trouble.
The fix will be in 10.1.0-M15 and 10.0.21.