Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0051112Openbravo ERPA. Platformpublic2022-12-12 18:352023-02-23 16:16
shuehner 
mqueralt 
normalminorhave not tried
closedfixed 
5
 
 
Core
No
0051112: JDK20 java.net.URL constructors (JDK-8294241) - omni-wms
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 omni-wms modules
      1 org.openbravo.warehouse.advancedwarehouseoperations.printing.bartender
-
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:35shuehnerNew Issue
2022-12-12 18:35shuehnerAssigned To => Triage Platform Base
2022-12-12 18:35shuehnerModules => Core
2022-12-12 18:35shuehnerTriggers an Emergency Pack => No
2022-12-12 18:35shuehnerIssue generated from0051108
2022-12-12 18:35shuehnerRelationship addedrelated to 0051108
2022-12-12 18:37shuehnerRelationship addedblocks 0051107
2022-12-12 18:38shuehnerNote Added: 0144553
2022-12-12 18:40shuehnerAssigned ToTriage Platform Base => Triage Omni WMS
2022-12-13 21:41mtaalAssigned ToTriage Omni WMS => mqueralt
2023-01-09 14:10mtaalNote Added: 0145208
2023-02-23 12:18hgbotNote Added: 0146911
2023-02-23 16:16hgbotResolutionopen => fixed
2023-02-23 16:16hgbotStatusnew => closed
2023-02-23 16:16hgbotNote Added: 0146920
2023-02-23 16:16hgbotNote Added: 0146921

Notes
(0144553)
shuehner   
2022-12-12 18:38   
[java] 14. WARNING in /srv/ci/workspace/mod-simple-ci50.52002/modules/org.openbravo.warehouse.advancedwarehouseoperations.printing.bartender/src/org/openbravo/warehouse/advancedwarehouseoperations/printing/bartender/service/BartenderPrintingService.java (at line 101)
     [java] HttpURLConnection con = (HttpURLConnection) new URL(url).openConnection();
     [java] ^^^^^^^^
     [java] The constructor URL(String) is deprecated since version 20
(0145208)
mtaal   
2023-01-09 14:10   
https://openbravo.atlassian.net/browse/RM-4486 [^]
(0146911)
hgbot   
2023-02-23 12:18   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.printing.bartender/-/merge_requests/2 [^]
(0146920)
hgbot   
2023-02-23 16:16   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.printing.bartender [^]
Changeset: 97272db0bd7947b96e4b40c83fbaceada0e2b3da
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 23-02-2023 15:16:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.printing.bartender/-/commit/97272db0bd7947b96e4b40c83fbaceada0e2b3da [^]

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

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/printing/bartender/service/BartenderPrintingService.java
---
(0146921)
hgbot   
2023-02-23 16:16   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.printing.bartender/-/merge_requests/2 [^]