Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049433Openbravo ERPA. Platformpublic2022-05-30 07:562022-09-04 23:50
alostale 
Triage Platform Base 
normalminorhave not tried
closedfixed 
5
 
PR22Q4PR22Q4 
Core
No
0049433: JDK19 deprecates Locale(String, String) constructor - core
See https://jdk.java.net/19/release-notes [^]

Deprecation of Locale class constructors (JDK-8282819)
core-libs/java.util:i18n

New Locale.of() factory methods replace deprecated Locale constructors. The factory methods are efficient and reuse existing Locale instances. Locales are also provided by Locale.forLanguageTag() and Locale.Builder.

Compile using JDK19 (tested with ea24):

The constructor Locale(String, String) is deprecated since version 19 HttpSecureAppServlet.java /openbravo/src/org/openbravo/base/secureApp line 1209 Java Problem
The constructor Locale(String, String) is deprecated since version 19 JasperProcess.java /openbravo/src/org/openbravo/erpCommon/ad_process line 80 Java Problem
The constructor Locale(String, String) is deprecated since version 19 ReportManager.java /openbravo/src/org/openbravo/erpCommon/utility/reporting line 229 Java Problem
Use locale builder [1] which is available since JDK7

[1] https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.Builder.html [^]
No tags attached.
related to defect 0049434 closed igor_trebol Localization Pack: Spain JDK19 deprecates Locale(String, String) constructor - splp 
blocks feature request 0049432 new Triage Platform Base Openbravo ERP Support JDK19 
Issue History
2022-05-30 07:56alostaleNew Issue
2022-05-30 07:56alostaleAssigned To => Triage Platform Base
2022-05-30 07:56alostaleModules => Core
2022-05-30 07:56alostaleTriggers an Emergency Pack => No
2022-05-30 07:59alostaleProposed Solution updated
2022-05-30 08:03alostaleRelationship addedblocks 0049432
2022-05-30 08:05alostaleIssue cloned0049434
2022-05-30 08:07alostaleRelationship addedrelated to 0049434
2022-05-30 08:08alostaleSummaryJDK19 deprecates Locale(String, String) constructor => JDK19 deprecates Locale(String, String) constructor - core
2022-06-23 13:15alostaleTarget Version => PR22Q4
2022-07-29 13:28shuehnerNote Added: 0139727
2022-08-17 21:02hgbotNote Added: 0140210
2022-09-04 23:50hgbotNote Added: 0140654
2022-09-04 23:50hgbotResolutionopen => fixed
2022-09-04 23:50hgbotStatusnew => closed
2022-09-04 23:50hgbotFixed in Version => PR22Q4
2022-09-04 23:50hgbotNote Added: 0140655

Notes
(0139727)
shuehner   
2022-07-29 13:28   
Adding SLA date after checking ALO/SHU
(0140210)
hgbot   
2022-08-17 21:02   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/686 [^]
(0140654)
hgbot   
2022-09-04 23:50   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/686 [^]
(0140655)
hgbot   
2022-09-04 23:50   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 6210cd1b0eee6da1ad250c4f52b0c1faa983acdc
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 04-09-2022 23:35:30
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/6210cd1b0eee6da1ad250c4f52b0c1faa983acdc [^]

Fixes ISSUE-49433: Changed deprecated locale class constructor

Jdk19 deprecates the Locale(String,String) constructor.
New Locale.of convenience classes are only available from Java19
onwards, so use the Locale.Builder() methods instead which are
available sine Java7 already.

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
M src/org/openbravo/erpCommon/ad_process/JasperProcess.java
M src/org/openbravo/erpCommon/utility/reporting/ReportManager.java
---