From 205b04645c192159431bc3a8395f3a4e9e1163fa Mon Sep 17 00:00:00 2001 From: gregdyke Date: Thu, 10 Jul 2025 18:04:29 +0100 Subject: [PATCH] chore: fix deprecated use of URL constructor --- .../com/avaloq/tools/ddk/check/core/test/BugAig1314.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java index 83255e3a05..6aa9bd1f85 100644 --- a/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java +++ b/com.avaloq.tools.ddk.check.core.test/src/com/avaloq/tools/ddk/check/core/test/BugAig1314.java @@ -16,6 +16,7 @@ import java.io.InputStream; import java.net.MalformedURLException; +import java.net.URISyntaxException; import java.net.URL; import org.eclipse.emf.common.util.URI; @@ -57,8 +58,8 @@ private static class TestScope extends CatalogFromExtensionPointScope { * * @return Some syntactically correct but otherwise meaningless URL. */ - private URL createURL() throws MalformedURLException { - return new URL("http://" + TEST_CATALOG_FILE + TEST_CATALOG_EXTENSION); + private URL createURL() throws MalformedURLException, URISyntaxException { + return new java.net.URI("http://" + TEST_CATALOG_FILE + TEST_CATALOG_EXTENSION).toURL(); } /** @@ -121,7 +122,7 @@ private void assertIterableNotEmpty(final Iterable iterable) { * Tests that querying the same scope twice doesn't make the resource set grow. */ @Test - public void testSameScopeUseTwice() throws MalformedURLException { + public void testSameScopeUseTwice() throws MalformedURLException, URISyntaxException { XtextResourceSet rs = new XtextResourceSet(); URL url = createURL(); ModelLocation modelLocation = createModelLocation(url); @@ -140,7 +141,7 @@ public void testSameScopeUseTwice() throws MalformedURLException { * Tests that querying two different scopes doesn't make the resource set grow. That one was the real cause of bug AIG-1314. */ @Test - public void testDifferentScopeUseTwice() throws MalformedURLException { + public void testDifferentScopeUseTwice() throws MalformedURLException, URISyntaxException { XtextResourceSet rs = new XtextResourceSet(); URL url = createURL(); ModelLocation modelLocation = createModelLocation(url);