Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0051110Openbravo ERPA. Platformpublic2022-12-12 18:322023-02-23 17:53
shuehner 
Triage Platform Conn 
normalminorhave not tried
closedfixed 
5
 
 
Core
No
0051110: JDK20 java.net.URL constructors (JDK-8294241) - platform-conn
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 platform-conn modules
      1 org.openbravo.authorize.net
      1 org.openbravo.base.cxf
      1 org.openbravo.externaldata.integration
      2 org.openbravo.service.integration.magento.core
-
No tags attached.
related to defect 0051108 closed Triage Platform Base JDK20 java.net.URL constructors (JDK-8294241) - core 
blocks feature request 0051107 new Triage Platform Base Support JDK20 
Issue History
2022-12-12 18:32shuehnerNew Issue
2022-12-12 18:32shuehnerAssigned To => Triage Platform Conn
2022-12-12 18:32shuehnerModules => Core
2022-12-12 18:32shuehnerTriggers an Emergency Pack => No
2022-12-12 18:32shuehnerIssue generated from0051108
2022-12-12 18:32shuehnerRelationship addedrelated to 0051108
2022-12-12 18:37shuehnerRelationship addedblocks 0051107
2022-12-12 18:40shuehnerNote Added: 0144555
2022-12-14 17:25AugustoMauchStatusnew => acknowledged
2023-02-23 12:34hgbotNote Added: 0146913
2023-02-23 13:29hgbotNote Added: 0146915
2023-02-23 13:35hgbotNote Added: 0146916
2023-02-23 13:38hgbotNote Added: 0146917
2023-02-23 17:50hgbotNote Added: 0146928
2023-02-23 17:50hgbotResolutionopen => fixed
2023-02-23 17:50hgbotStatusacknowledged => closed
2023-02-23 17:50hgbotNote Added: 0146929
2023-02-23 17:50hgbotNote Added: 0146930
2023-02-23 17:51hgbotNote Added: 0146931
2023-02-23 17:51hgbotNote Added: 0146932
2023-02-23 17:52hgbotNote Added: 0146933
2023-02-23 17:52hgbotNote Added: 0146934
2023-02-23 17:53hgbotNote Added: 0146935
2023-02-23 17:53hgbotNote Added: 0146936

Notes
(0144555)
shuehner   
2022-12-12 18:40   
The constructor URL(String) is deprecated since version 20

1. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.authorize.net/src/org/openbravo/authorize/net/api/utils/SoapAPIAccess.java (at line 142)
    wsdl_url = new URL(url);
                   ^^^^^^^^
----------
2. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.base.cxf/src/org/openbravo/base/cxf/client/SOAPClient.java (at line 66)
    this.wsdl = new URL(wsdl);
                    ^^^^^^^^^
----------
4. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.externaldata.integration/src/org/openbravo/externaldata/integration/process/OutputWSRestProcessor.java (at line 61)
    URL url = new URL(wsPath);
                  ^^^^^^^^^^^
----------
11. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.service.integration.magento.core/src/org/openbravo/service/integration/magento/core/MagentoRequestHelper.java (at line 84)
    URL obj = new URL(url);
                  ^^^^^^^^
----------
12. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.service.integration.magento.core/src/org/openbravo/service/integration/magento/core/MagentoRequestHelper.java (at line 115)
    URL obj = new URL(url);
                  ^^^^^^^^
(0146913)
hgbot   
2023-02-23 12:34   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.magento.core/-/merge_requests/4 [^]
(0146915)
hgbot   
2023-02-23 13:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/26 [^]
(0146916)
hgbot   
2023-02-23 13:35   
Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.base.cxf/-/merge_requests/6 [^]
(0146917)
hgbot   
2023-02-23 13:38   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.authorize.net/-/merge_requests/3 [^]
(0146928)
hgbot   
2023-02-23 17:50   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.magento.core [^]
Changeset: 36531f63a2cb10c980532724a4ebb9ea348cf196
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 23-02-2023 12:30:44
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.magento.core/-/commit/36531f63a2cb10c980532724a4ebb9ea348cf196 [^]

Related to ISSUE-51110: Apply java code formatting

---
M src/org/openbravo/service/integration/magento/core/MagentoRequestHelper.java
---
(0146929)
hgbot   
2023-02-23 17:50   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.magento.core [^]
Changeset: 660760aa9785439fb033abd4487692b90b6f3b72
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 23-02-2023 12:35:49
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.magento.core/-/commit/660760aa9785439fb033abd4487692b90b6f3b72 [^]

Fixes ISSUE-51110: Fix JDK20 deprecation warnings related to new URL

JDK20 deprecates using the new URL constructor.
Suggested replacement is to go via new URI(...).toURL() instead.
The URI class is already present since Java 1.4

---
M src/org/openbravo/service/integration/magento/core/MagentoRequestHelper.java
---
(0146930)
hgbot   
2023-02-23 17:50   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.magento.core/-/merge_requests/4 [^]
(0146931)
hgbot   
2023-02-23 17:51   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/merge_requests/26 [^]
(0146932)
hgbot   
2023-02-23 17:51   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration [^]
Changeset: 1db5d683c49e0fee926e46b8c7dc7c9b8805472f
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 23-02-2023 13:28:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.externaldata.integration/-/commit/1db5d683c49e0fee926e46b8c7dc7c9b8805472f [^]

Fixes ISSUE-51110: Fix JDK20 deprecation warnings related to new URL

JDK20 deprecates using the new URL constructor.
Suggested replacement is to go via new URI(...).toURL() instead.
The URI class is already present since Java 1.4

---
M src/org/openbravo/externaldata/integration/process/OutputWSRestProcessor.java
---
(0146933)
hgbot   
2023-02-23 17:52   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/mods/org.openbravo.base.cxf [^]
Changeset: 9896d76084907f97c4dee051e55205f65456f620
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 23-02-2023 13:34:48
URL: https://gitlab.com/openbravo/product/mods/org.openbravo.base.cxf/-/commit/9896d76084907f97c4dee051e55205f65456f620 [^]

Fixes ISSUE-51110: Fix JDK20 deprecation warnings related to new URL

JDK20 deprecates using the new URL constructor.
Suggested replacement is to go via new URI(...).toURL() instead.
The URI class is already present since Java 1.4

---
M src/org/openbravo/base/cxf/client/SOAPClient.java
---
(0146934)
hgbot   
2023-02-23 17:52   
Merge request merged: https://gitlab.com/openbravo/product/mods/org.openbravo.base.cxf/-/merge_requests/6 [^]
(0146935)
hgbot   
2023-02-23 17:53   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.authorize.net [^]
Changeset: e2ad666e2f19c45051f273b8488650b730486b23
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 23-02-2023 13:37:31
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.authorize.net/-/commit/e2ad666e2f19c45051f273b8488650b730486b23 [^]

Fixes ISSUE-51110: Fix JDK20 deprecation warnings related to new URL

JDK20 deprecates using the new URL constructor.
Suggested replacement is to go via new URI(...).toURL() instead.
The URI class is already present since Java 1.4

---
M src/org/openbravo/authorize/net/api/utils/SoapAPIAccess.java
---
(0146936)
hgbot   
2023-02-23 17:53   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.authorize.net/-/merge_requests/3 [^]