You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Adam Rauch <ad...@labkey.com> on 2021/06/14 19:31:52 UTC
Jasper's use of deprecated boxed primitive constructors
As you're probably aware, all Boolean, Byte, Character, Double, Float,
Integer, Long, and Short constructors were deprecated in JDK 9,
https://www.oracle.com/java/technologies/javase/9-deprecated-features.html#JDK-8065614.
They were then marked forRemoval=true in JDK 16.
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 at some point. Is there
any plan to adjust the code gen to use auto-boxing or valueOf() instead
of the deprecated constructors?
I can file a bug and/or work up a patch. JspUtil.java appears to contain
the relevant code.
Thanks,
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Jasper's use of deprecated boxed primitive constructors
Posted by Adam Rauch <ad...@labkey.com>.
On 6/14/2021 12:38 PM, Mark Thomas wrote:
> On 14/06/2021 20:31, Adam Rauch wrote:
>> As you're probably aware, all Boolean, Byte, Character, Double,
>> Float, Integer, Long, and Short constructors were deprecated in JDK
>> 9,
>> https://www.oracle.com/java/technologies/javase/9-deprecated-features.html#JDK-8065614.
>> They were then marked forRemoval=true in JDK 16.
>>
>> 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 at some point.
>> Is there any plan to adjust the code gen to use auto-boxing or
>> valueOf() instead of the deprecated constructors?
>
> Not yet.
>
>> I can file a bug and/or work up a patch. JspUtil.java appears to
>> contain the relevant code.
>
> That would be great. Tx.
>
> Mark
>
Thanks, Mark. Bug created:
https://bz.apache.org/bugzilla/show_bug.cgi?id=65377
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Jasper's use of deprecated boxed primitive constructors
Posted by Mark Thomas <ma...@apache.org>.
On 14/06/2021 20:31, Adam Rauch wrote:
> As you're probably aware, all Boolean, Byte, Character, Double, Float,
> Integer, Long, and Short constructors were deprecated in JDK 9,
> https://www.oracle.com/java/technologies/javase/9-deprecated-features.html#JDK-8065614.
> They were then marked forRemoval=true in JDK 16.
>
> 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 at some point. Is there
> any plan to adjust the code gen to use auto-boxing or valueOf() instead
> of the deprecated constructors?
Not yet.
> I can file a bug and/or work up a patch. JspUtil.java appears to contain
> the relevant code.
That would be great. Tx.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org