Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0051679Localization Pack: SpainAEAT 303public2023-02-23 10:222023-02-28 09:35
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
 
0051679: JDK19 deprecates Locale(String, String) constructor - splp
This is essentially older issue 49434 again. As some newly added code in aeat303 module reintroducing that problem again.

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.


     [java] 4. WARNING in /srv/ci/workspace/mod-simple-ci50.52004/modules/org.openbravo.module.aeat303.es/src/org/openbravo/module/aeat303/es/report/v2023/AEAT303Report2023.java (at line 59)
     [java] SimpleDateFormat sdf = new SimpleDateFormat(format, new Locale("es", "ES"));
     [java] ^^^^^^^^^^^^^^^^^^
     [java] The constructor Locale(String, String) is deprecated since version 19
Compile using JDK19 (or 20 now)

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 JDK19 deprecates Locale(String, String) constructor - splp 
caused by feature request 0050829 closed mgonzalezh New Design 303 2023 y siguientes  
Issue History
2023-02-23 10:22shuehnerNew Issue
2023-02-23 10:22shuehnerAssigned To => Jorge Bravo
2023-02-23 10:23shuehnerRelationship addedrelated to 0049434
2023-02-23 10:23shuehnerRelationship addedcaused by 0050829
2023-02-23 10:23shuehnerNote Added: 0146906
2023-02-23 10:45hgbotNote Added: 0146909
2023-02-23 10:46shuehnerNote Deleted: 0146909
2023-02-23 10:47hgbotNote Added: 0146910
2023-02-23 10:47shuehnerNote Deleted: 0146910
2023-02-27 18:24hgbotNote Added: 0147061
2023-02-28 09:35hgbotResolutionopen => fixed
2023-02-28 09:35hgbotStatusnew => closed
2023-02-28 09:35hgbotNote Added: 0147091
2023-02-28 09:35hgbotNote Added: 0147092
2023-02-28 09:35aferrazAssigned ToJorge Bravo => shuehner

Notes
(0146906)
shuehner   
2023-02-23 10:23   
CI job which can be used for verification (and seeing the problem now)
https://builds.openbravo.com/view/modules/job/mod-merged-future-stack/ [^]
(0147061)
hgbot   
2023-02-27 18:24   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.aeat303.es/-/merge_requests/23 [^]
(0147091)
hgbot   
2023-02-28 09:35   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.aeat303.es [^]
Changeset: 4724601e69b7e0816cf53459d6104588087baa50
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 28-02-2023 08:35:10
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.aeat303.es/-/commit/4724601e69b7e0816cf53459d6104588087baa50 [^]

Fixes ISSUE-51679: Changed deprecated locale class constructor

---
M src/org/openbravo/module/aeat303/es/report/v2023/AEAT303Report2023.java
---
(0147092)
hgbot   
2023-02-28 09:35   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.aeat303.es/-/merge_requests/23 [^]