From 74600437c041dd9ce4b64ecdcab7130371ad6d0d Mon Sep 17 00:00:00 2001 From: Bruno Salmon Date: Sun, 9 Jun 2024 10:38:09 +0100 Subject: [PATCH] Renamed "css" protocol to "webfx-css" --- .../protocol/{CssProtocol.java => WebFXCssProtocol.java} | 6 ++++-- .../src/main/java/module-info.java | 2 +- .../META-INF/services/java.net.spi.URLStreamHandlerProvider | 2 +- webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/webfx.xml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) rename webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/{CssProtocol.java => WebFXCssProtocol.java} (85%) diff --git a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/CssProtocol.java b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/WebFXCssProtocol.java similarity index 85% rename from webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/CssProtocol.java rename to webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/WebFXCssProtocol.java index 967e62788..8b0b39009 100644 --- a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/CssProtocol.java +++ b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/dev/webfx/kit/css/protocol/WebFXCssProtocol.java @@ -12,11 +12,13 @@ /** * @author Bruno Salmon */ -public class CssProtocol extends URLStreamHandlerProvider { +public class WebFXCssProtocol extends URLStreamHandlerProvider { + + private static final String PROTOCOL_NAME = "webfx-css"; @Override public URLStreamHandler createURLStreamHandler(String protocol) { - if ("css".equals(protocol)) { + if (PROTOCOL_NAME.equalsIgnoreCase(protocol)) { return new URLStreamHandler() { @Override protected URLConnection openConnection(URL u) throws IOException { diff --git a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/module-info.java b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/module-info.java index b043b0847..30811d7c2 100644 --- a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/module-info.java +++ b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/java/module-info.java @@ -9,6 +9,6 @@ exports dev.webfx.kit.css.protocol; // Provided services - provides java.net.spi.URLStreamHandlerProvider with dev.webfx.kit.css.protocol.CssProtocol; + provides java.net.spi.URLStreamHandlerProvider with dev.webfx.kit.css.protocol.WebFXCssProtocol; } \ No newline at end of file diff --git a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/resources/META-INF/services/java.net.spi.URLStreamHandlerProvider b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/resources/META-INF/services/java.net.spi.URLStreamHandlerProvider index 20db44471..a69f09f2d 100644 --- a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/resources/META-INF/services/java.net.spi.URLStreamHandlerProvider +++ b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/src/main/resources/META-INF/services/java.net.spi.URLStreamHandlerProvider @@ -1 +1 @@ -dev.webfx.kit.css.protocol.CssProtocol +dev.webfx.kit.css.protocol.WebFXCssProtocol diff --git a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/webfx.xml b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/webfx.xml index 3280750cd..679cf43d6 100644 --- a/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/webfx.xml +++ b/webfx-kit/webfx-kit-cssprotocol-openjfx-plugin/webfx.xml @@ -11,7 +11,7 @@ - dev.webfx.kit.css.protocol.CssProtocol + dev.webfx.kit.css.protocol.WebFXCssProtocol \ No newline at end of file