Jump to content
We've recently updated our Privacy Statement, available here ×

Integer has been deprecated and marked for removal


ondragalik
Go to solution Solved by darth_fader,

Recommended Posts

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

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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.
 

Link to comment
Share on other sites

  • Solution

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.

 

Link to comment
Share on other sites

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...