Bug 65377 - Migrate Jasper's use of deprecated boxed primitive constructors
Summary: Migrate Jasper's use of deprecated boxed primitive constructors
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 9.0.46
Hardware: PC All
: P2 normal (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2021-06-14 21:21 UTC by Adam Rauch
Modified: 2021-06-25 12:17 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Adam Rauch 2021-06-14 21:21:07 UTC
JDK 9 deprecated all Boolean, Byte, Character, Double, Float, Integer, Long, and Short constructors, see https://www.oracle.com/java/technologies/javase/9-deprecated-features.html#JDK-8065614. JDK 16 then marked them as forRemoval=true.

Jasper generates code that uses these deprecated constructors, when binding tag attributes to setters. This results in fairly adamant warnings when compiling on javac (not sure how JDT reacts). For now, the generated code compiles and the warnings could be disabled, but they're clearly telling us the JDK will remove support in the future.

JDK documentation suggests replacing use of boxed primitive constructors with auto-boxing or valueOf() static factory methods. JspUtil.java appears to contain the code that needs adjusting.
Comment 1 Mark Thomas 2021-06-25 12:17:09 UTC
Thanks for reporting this.

Fixed in:
- 10.1.x for 10.1.0-M2 onwards
- 10.0.x for 10.0.8 onwards
- 9.0.x for 9.0.49 onwards
- 8.5.x for 8.5.69 onwards