Jump to content

Integer has been deprecated and marked for removal


Go to solution Solved by darth_fader,

Recommended Posts

Posted

JRJdk13Compiler shows theses warnings:

warning: [removal] Integer(int) in Integer has been deprecated and marked for removal value = new java.lang.Integer(1); //$JR_EXPR_ID=1$

Most probably this deprecated syntax (new java.lang.Integer(int)) is used for initialization of Integer variables defined in the report (built-in variables). Could someone please help me how to change that initialization for Integer.valueOf(int)?

Many thanks

 

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
 

  • Solution
Posted

This deprecation started on JDK V9. JasperReports library (and JasperServer) are compatible with specific versions of Java, and so if you compiled the report in JDK 8 you'd eliminate this issue.

Potential solutions include:

1. install JDK 8 and configuring your environment to use that rather than 13

2. update the version of JasperReports/Server you're using - assuming the latest libraries are compatible with JDK 13, I'm a few versions behind and so I'm not sure what's compatible with what

3. ignore it for now - this type of deprecated functionality is not likely to cause problems - that type of casting is so widely used, and the integer functionality so basic, that you likely won't have any problems with this. If your project can't tolerate these warnings, you'll have to work through one of the first two options.

 

Posted

Hi,

thank you for your answer. I'm using version 6.9 which supports JDK V9 (since 6.8. has support up to Java 11). I can ignore warnings for now. 

Thanks.

Posted

I am using JasperReports as an reporting add-on in jmix.io which generates report from the jrxml on the fly. So this is more jmix configuration issue. Maybe its future update will resolve that.

 

Thanks 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...