Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037967Retail ModulesWeb POSpublic2018-02-19 11:592018-02-26 18:00
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
RR18Q2 
marvintm
No
0037967: JDK9: Fix new deprecation warnings related to: new Long, new Integer, new Boolean...
    Java since long time had both:
- new Integer(String
- new Integer(int)

but also
- int Integer.parseInt
- Integer Integer.valueOf

With the latter being preferred (i.e. not constructing new instance for performance etc)

JDK9 now deprecated those constructors.

This issue fixes all cases in pi of the now deprecated usage by applying simple pattern depending on usage:

Special notes:
a.) StatusBackgroundProcessScheduler
used int as return type of private method getPingInterval but later needs Long object for dal setter.
Change method type to return long instead to avoid need to convert type later.

b.) POSUtils had type confusion also parsing Long -> changing to int
After checking with amo use int type consistently here (should be 'long' enough)
Compile with JDK9 and observe new compilation warnings.
No tags attached.
blocks feature request 0037083 closed alostale Openbravo ERP support JDK 9 
Issue History
2018-02-19 11:59shuehnerNew Issue
2018-02-19 11:59shuehnerAssigned To => shuehner
2018-02-19 11:59shuehnerTriggers an Emergency Pack => No
2018-02-19 11:59shuehnerRelationship addedblocks 0037083
2018-02-19 12:03hgbotCheckin
2018-02-19 12:03hgbotNote Added: 0102488
2018-02-19 12:04shuehnerStatusnew => scheduled
2018-02-19 12:07hgbotCheckin
2018-02-19 12:07hgbotNote Added: 0102489
2018-02-19 12:07hgbotStatusscheduled => resolved
2018-02-19 12:07hgbotResolutionopen => fixed
2018-02-19 12:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ee1e56342da5f900e82b3134b38c33166aed7671 [^]
2018-02-19 12:07shuehnerReview Assigned To => marvintm
2018-02-26 18:00marvintmStatusresolved => closed
2018-02-26 18:00marvintmFixed in Version => RR18Q2

Notes
(0102488)
hgbot   
2018-02-19 12:03   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 909adc9e2f65a222cf52cc0412aca90fc7ed54ec
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Feb 19 12:01:29 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/909adc9e2f65a222cf52cc0412aca90fc7ed54ec [^]

Issue 37967. Fix new JDK9 deprecation warnings related to new Long

new Long is deprecated now replace it by Long.valueOf & autoboxing

---
M src/org/openbravo/mobile/core/listener/StatusBackgroundProcessScheduler.java
M src/org/openbravo/mobile/core/process/SimpleQueryBuilder.java
---
(0102489)
hgbot   
2018-02-19 12:07   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: ee1e56342da5f900e82b3134b38c33166aed7671
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Feb 19 12:07:30 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/ee1e56342da5f900e82b3134b38c33166aed7671 [^]

Fixed 37967. Fix new jdk9 deprecation warnings related to new Long.

Replace usage of new Long, new Double by equivalent use of autoboxing
and .valueOf.

Special mention:
POSUtils -> consistently use int as type instead of int/long mix.

---
M src/org/openbravo/retail/posterminal/OrderGroupingProcessor.java
M src/org/openbravo/retail/posterminal/OrderLoader.java
M src/org/openbravo/retail/posterminal/POSUtils.java
M src/org/openbravo/retail/posterminal/SyncAllErrorsWhileImporting.java
---