Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0051108Openbravo ERPA. Platformpublic2022-12-12 16:172022-12-14 10:43
shuehner 
Triage Platform Base 
normalminorhave not tried
closedfixed 
5
 
PR23Q1 
Core
No
0051108: JDK20 java.net.URL constructors (JDK-8294241) - core
See
https://jdk.java.net/20/ [^] (to download)
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)
-
No tags attached.
related to defect 0051110 closed Triage Platform Conn Openbravo ERP JDK20 java.net.URL constructors (JDK-8294241) - platform-conn 
related to defect 0051111 closed Retail Retail Modules JDK20 java.net.URL constructors (JDK-8294241) - pos team 
related to defect 0051112 closed mqueralt Openbravo ERP JDK20 java.net.URL constructors (JDK-8294241) - omni-wms 
blocks feature request 0051107 new Triage Platform Base Openbravo ERP Support JDK20 
Issue History
2022-12-12 16:17shuehnerNew Issue
2022-12-12 16:17shuehnerAssigned To => Triage Platform Base
2022-12-12 16:17shuehnerModules => Core
2022-12-12 16:17shuehnerTriggers an Emergency Pack => No
2022-12-12 16:17shuehnerRelationship addedblocks 0051107
2022-12-12 16:22hgbotNote Added: 0144543
2022-12-12 18:31shuehnerSummaryJDK20 java.net.URL constructors (JDK-8294241) => JDK20 java.net.URL constructors (JDK-8294241) - core
2022-12-12 18:32shuehnerIssue cloned0051110
2022-12-12 18:32shuehnerRelationship addedrelated to 0051110
2022-12-12 18:33shuehnerIssue cloned0051111
2022-12-12 18:33shuehnerRelationship addedrelated to 0051111
2022-12-12 18:35shuehnerIssue cloned0051112
2022-12-12 18:35shuehnerRelationship addedrelated to 0051112
2022-12-12 19:02shuehnerDescription Updatedbug_revision_view_page.php?rev_id=25231#r25231
2022-12-14 10:43hgbotResolutionopen => fixed
2022-12-14 10:43hgbotStatusnew => closed
2022-12-14 10:43hgbotNote Added: 0144665
2022-12-14 10:43hgbotFixed in Version => PR23Q1
2022-12-14 10:43hgbotNote Added: 0144666

Notes
(0144543)
hgbot   
2022-12-12 16:22   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/784 [^]
(0144665)
hgbot   
2022-12-14 10:43   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/784 [^]
(0144666)
hgbot   
2022-12-14 10:43   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b96661917b7de35fc1df0441b4a5d86c23a15ed4
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 14-12-2022 09:39:44
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b96661917b7de35fc1df0441b4a5d86c23a15ed4 [^]

Fixes ISSUE-51108: 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 modules/org.openbravo.service.json/src-test/org/openbravo/service/json/test/JsonRestTest.java
M src-test/src/org/openbravo/test/datasource/DatasourceTestUtil.java
M src-test/src/org/openbravo/test/doc/GenerateEntityModelWiki.java
M src-test/src/org/openbravo/test/webservice/BaseWSTest.java
M src-test/src/org/openbravo/test/webservice/PerformanceTest.java
M src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
M src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
M src/org/openbravo/erpCommon/modules/ImportModule.java
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/erpCommon/obps/ActiveInstanceProcess.java
M src/org/openbravo/erpCommon/utility/HttpsUtils.java
---