File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
main/java/net/sourceforge/jnlp/util
test/java/net/sourceforge/jnlp/util Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class UrlKey {
1717 public UrlKey (final URL url ) {
1818 this .url = url ;
1919 this .protocol = url .getProtocol () != null ? url .getProtocol ().toLowerCase (Locale .ENGLISH ) : null ;
20- this .host = url .getHost ();
20+ this .host = url .getHost () != null ? url . getHost (). toLowerCase ( Locale . ENGLISH ) : null ;
2121 this .port = url .getPort ();
2222 this .file = url .getFile ();
2323 this .ref = url .getRef ();
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ public void testEqualsHttp() throws Exception {
1313 URL url1 = new URL ("http://www.example.com:80/index.html?a=b#3" );
1414 List <URL > urlList = Arrays .asList (
1515 new URL ("http://www.example.com/index.html?a=b#3" ),
16+ new URL ("http://www.Example.Com/index.html?a=b#3" ),
1617 new URL ("Http://www.example.com/index.html?a=b#3" ),
1718 new URL ("http://www.example.com:80/index.html?a=b#3" ));
1819
@@ -29,7 +30,7 @@ public void testEqualsHttp() throws Exception {
2930 public void testNotEqualsHttp () throws Exception {
3031 URL url1 = new URL ("http://www.example.com:80/index.html?a=b#3" );
3132 List <URL > urlList = Arrays .asList (
32- new URL ("http://www.Example.com :80/index.html?a=b#3" ),
33+ new URL ("http://www.example.org :80/index.html?a=b#3" ),
3334 new URL ("http://www.example.com:80/index2.html?a=b#3" ),
3435 new URL ("http://www.example.com:80/index.html#3" ),
3536 new URL ("https://www.example.com:80/index.html?a=b#3" ),
You can’t perform that action at this time.
0 commit comments