From 1b832413f098e77be4bac262ddcb27856bab5f12 Mon Sep 17 00:00:00 2001 From: HURIEZ Mathis Date: Tue, 26 Mar 2024 16:44:37 +0100 Subject: [PATCH] Rollback to keep file check for resource name --- .../display/builder/model/util/ModelResourceUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/display/model/src/main/java/org/csstudio/display/builder/model/util/ModelResourceUtil.java b/app/display/model/src/main/java/org/csstudio/display/builder/model/util/ModelResourceUtil.java index f0249da95c..101447f514 100644 --- a/app/display/model/src/main/java/org/csstudio/display/builder/model/util/ModelResourceUtil.java +++ b/app/display/model/src/main/java/org/csstudio/display/builder/model/util/ModelResourceUtil.java @@ -350,8 +350,6 @@ private static boolean canOpenUrl(final String resource_name) //Stream is not OK for a https URL url = new URL(resource_name); url.openConnection(); - // int responseCode = huc.getResponseCode(); - // Assert.assertEquals(HttpURLConnection.HTTP_OK, responseCode); canOpenUrl = true; } catch (Exception ex) @@ -431,7 +429,7 @@ public static InputStream openResourceStream(final String resource_name) throws // final long milli = Math.round(1000 + Math.random()*4000); // Thread.sleep(milli); // } - if (resource_name.startsWith("http")) + if (resource_name.startsWith("http") || resource_name.startsWith("file:/")) return openURL(resource_name); // Handle legacy RCP URL