ondragalik Posted May 14, 2023 Posted May 14, 2023 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
Mehak Rajkumar Posted May 15, 2023 Posted May 15, 2023 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 darth_fader Posted May 15, 2023 Solution Posted May 15, 2023 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 132. 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 what3. 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.
ondragalik Posted May 16, 2023 Author Posted May 16, 2023 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.
darth_fader Posted May 16, 2023 Posted May 16, 2023 FYI You should be able to install JDK 8 alongside 9 and point studio to use 8, Preferences -> Java -> Build Path. You can have multiple JDKs on the same os.
ondragalik Posted May 16, 2023 Author Posted May 16, 2023 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now