mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
JsonAddonService: Fix warning on startup (#4602)
When starting openHAB, I always get the following warning: ``` 14:44:47.082 [WARN ] [tplace.internal.json.JsonAddonService] - JSON Addon Service invalid URL: ``` We should avoid this warning, I don't see a problem there, and we should not confuse users with unnecessary warnings. Signed-off-by: Florian Hotze <dev@florianhotze.com>
This commit is contained in:
+3
@@ -101,6 +101,9 @@ public class JsonAddonService extends AbstractRemoteAddonService {
|
||||
}
|
||||
|
||||
private boolean isValidUrl(String urlString) {
|
||||
if (urlString.isBlank()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
(new URI(urlString)).toURL();
|
||||
} catch (IllegalArgumentException | URISyntaxException | MalformedURLException e) {
|
||||
|
||||
Reference in New Issue
Block a user