From: Jim Procter Date: Wed, 5 Jun 2024 14:19:00 +0000 (+0100) Subject: JAL-1054 JAL-1551 formatting and javadoc X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5f5c156df6eb89f6b9483a63558e078a4b0d3d4c;p=jalview.git JAL-1054 JAL-1551 formatting and javadoc --- diff --git a/src/jalview/util/HttpUtils.java b/src/jalview/util/HttpUtils.java index 44880a0..d93a476 100644 --- a/src/jalview/util/HttpUtils.java +++ b/src/jalview/util/HttpUtils.java @@ -34,6 +34,15 @@ public class HttpUtils { public final static String JALVIEWSCHEMEPREFIX = "jalview"; + /** + * check if this is a real URI we can handle + * + * TODO: NEEDS TESTS + * + * @param s + * @return true if given string resolves to a HTTP(S) URL, Jalview Scheme URI, + * or some other URI that this system supports (including file:/home") + */ public static boolean isPlausibleUri(String s) { if (s == null) diff --git a/test/jalview/util/HttpUtilsTest.java b/test/jalview/util/HttpUtilsTest.java index d8b757d..98a94cb 100644 --- a/test/jalview/util/HttpUtilsTest.java +++ b/test/jalview/util/HttpUtilsTest.java @@ -12,6 +12,12 @@ import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +/** + * tests covering retrieval of data from URLs + * + * TODO: implement mocks so we don't need external network sources + */ + public class HttpUtilsTest { @Test(groups = { "Network" }, dataProvider = "urlTargetsAndDestinations")