From f3bef0516ceeaff7f71165ddfc4500d3457e9ed4 Mon Sep 17 00:00:00 2001 From: Miki Rozloznik Date: Fri, 6 Dec 2024 16:19:06 +0100 Subject: [PATCH] Fix --- compiler/core/src/zserio/tools/ExtensionManager.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/core/src/zserio/tools/ExtensionManager.java b/compiler/core/src/zserio/tools/ExtensionManager.java index b42bb1d6a..384a1d25b 100644 --- a/compiler/core/src/zserio/tools/ExtensionManager.java +++ b/compiler/core/src/zserio/tools/ExtensionManager.java @@ -6,12 +6,11 @@ import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; +import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLClassLoader; import java.net.URLDecoder; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; @@ -150,9 +149,9 @@ private File getWorkingDirectory() File decodedExecFile = null; try { - decodedExecFile = new File(new URL(decodedExecUrlPath).toURI()); + decodedExecFile = new File(new URI(decodedExecUrlPath)); } - catch (MalformedURLException | URISyntaxException | IllegalArgumentException excpt) + catch (URISyntaxException excpt) { decodedExecFile = new File(decodedExecUrlPath); }