Openbravo Issue Tracking System - Retail Modules
View Issue Details
0051111Retail ModulesWeb POSpublic2022-12-12 18:332023-01-02 07:25
shuehner 
Retail 
normalminorhave not tried
closedfixed 
5
 
 
No
0051111: JDK20 java.net.URL constructors (JDK-8294241) - pos team
See
https://jdk.java.net/20/release-notes [^]
https://bugs.openjdk.org/browse/JDK-8294241 [^]
java.net.URL constructors are deprecated (JDK-8294241)


Java 20 deprecates some URL constructors and suggest to go via the URI classes (available since Java 1.4) and convert to URL from there:

https://download.java.net/java/early_access/jdk20/docs/api/java.base/java/net/URL.html#constructor-deprecation [^]

Example:
- final URL connUrl = new URL(completeUrl);
+ final URL connUrl = new URI(completeUrl).toURL();

Compile with jdk20 (ea build 23 or higher)

in pos modules
      1 org.openbravo.dqm.capency
      6 org.openbravo.retail.avalaraconnector
-
No tags attached.
related to defect 0051108 closed Triage Platform Base Openbravo ERP JDK20 java.net.URL constructors (JDK-8294241) - core 
blocks feature request 0051107 new Triage Platform Base Openbravo ERP Support JDK20 
Issue History
2022-12-12 18:33shuehnerNew Issue
2022-12-12 18:33shuehnerAssigned To => Triage Platform Base
2022-12-12 18:33shuehnerModules => Core
2022-12-12 18:33shuehnerTriggers an Emergency Pack => No
2022-12-12 18:33shuehnerIssue generated from0051108
2022-12-12 18:33shuehnerRelationship addedrelated to 0051108
2022-12-12 18:34shuehnerProjectOpenbravo ERP => Retail Modules
2022-12-12 18:34shuehnerAssigned ToTriage Platform Base => Retail
2022-12-12 18:34shuehnerCategoryA. Platform => Web POS
2022-12-12 18:36shuehnerSummaryJDK20 java.net.URL constructors (JDK-8294241) - core => JDK20 java.net.URL constructors (JDK-8294241) - pos team
2022-12-12 18:37shuehnerRelationship addedblocks 0051107
2022-12-12 18:38shuehnerNote Added: 0144554
2022-12-22 20:14hgbotNote Added: 0144947
2022-12-22 20:15hgbotNote Added: 0144948
2023-01-02 07:25hgbotResolutionopen => fixed
2023-01-02 07:25hgbotStatusnew => closed
2023-01-02 07:25hgbotNote Added: 0145110
2023-01-02 07:25hgbotNote Added: 0145111
2023-01-02 07:25hgbotNote Added: 0145112
2023-01-02 07:25hgbotNote Added: 0145113
2023-01-02 07:25hgbotNote Added: 0145114

Notes
(0144554)
shuehner   
2022-12-12 18:38   
[java] 3. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.dqm.capency/src/org/openbravo/dqm/capency/CapencyConnector.java (at line 209)
     [java] return new URL(url.toString());
     [java] ^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20

     [java] 5. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.retail.avalaraconnector/src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java (at line 52)
     [java] URL url = new URL(conf.getUrl() + PING_ENDPOINT);
     [java] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
     [java] ----------
     [java] 6. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.retail.avalaraconnector/src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java (at line 60)
     [java] URL url = new URL(conf.getUrl() + TAXCODES_ENDPOINT);
     [java] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
     [java] ----------
     [java] 7. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.retail.avalaraconnector/src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java (at line 68)
     [java] URL url = new URL(conf.getUrl() + ADDRESS_ENDPOINT);
     [java] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
     [java] ----------
     [java] 8. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.retail.avalaraconnector/src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java (at line 75)
     [java] URL url = new URL(conf.getUrl() + TAX_ENDPOINT);
     [java] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
     [java] ----------
     [java] 9. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.retail.avalaraconnector/src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java (at line 83)
     [java] URL url = new URL(conf.getUrl() + COMPANIES_ENDPOINT + conf.getCompanyCode()
     [java] + TRANSACTIONS_ENDPOINT + transactionCode + REFUND_ENDPOINT);
     [java] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
     [java] ----------
     [java] 10. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.retail.avalaraconnector/src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java (at line 92)
     [java] URL url = new URL(conf.getUrl() + TAX_ENDPOINT);
     [java] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
(0144947)
hgbot   
2022-12-22 20:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.avalaraconnector/-/merge_requests/4 [^]
(0144948)
hgbot   
2022-12-22 20:15   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.dqm.capency/-/merge_requests/2 [^]
(0145110)
hgbot   
2023-01-02 07:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.dqm.capency [^]
Changeset: 96aee633f8a109f23d41253fbca5a77d07544412
Author: dante.contrera <dante.contrera@smfconsulting.es>
Date: 22-12-2022 19:15:43
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.dqm.capency/-/commit/96aee633f8a109f23d41253fbca5a77d07544412 [^]

Fixed ISSUE-51111: Replaced URL deprecated constructors by URIs class method.

---
M src/org/openbravo/dqm/capency/CapencyConnector.java
---
(0145111)
hgbot   
2023-01-02 07:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.dqm.capency/-/merge_requests/2 [^]
(0145112)
hgbot   
2023-01-02 07:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.avalaraconnector [^]
Changeset: 9880b40fee24d569ea2a4825357832da67f4f43d
Author: dante.contrera <dante.contrera@smfconsulting.es>
Date: 22-12-2022 16:02:54
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.avalaraconnector/-/commit/9880b40fee24d569ea2a4825357832da67f4f43d [^]

Fixed ISSUE-51111: Replaced URL deprecated constructors by URIs class method.

---
M src/org/openbravo/retail/avalaraconnector/api/AvalaraAPI.java
---
(0145113)
hgbot   
2023-01-02 07:25   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.avalaraconnector [^]
Changeset: 97ff0420a48cd30ae7fa9218dea063f58fe1db90
Author: dante.contrera <dante.contrera@smfconsulting.es>
Date: 22-12-2022 16:39:51
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.avalaraconnector/-/commit/97ff0420a48cd30ae7fa9218dea063f58fe1db90 [^]

Related to ISSUE-51111: Added missing exception.

---
M src/org/openbravo/retail/avalaraconnector/edl/OBAVCODataProcessor.java
---
(0145114)
hgbot   
2023-01-02 07:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.avalaraconnector/-/merge_requests/4 [^]