Commit e3d981bc authored by Patrick Dowler's avatar Patrick Dowler
Browse files

fix GroupURI to check that scheme is ivo

parent e29bf705
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ sourceCompatibility = 1.7

group = 'org.opencadc'

version = '1.1.3'
version = '1.1.4'

mainClassName = 'ca.nrc.cadc.ac.client.Main'

+2 −2
Original line number Diff line number Diff line
@@ -99,9 +99,9 @@ public class GroupURI
        }

        // Ensure the scheme is correct
        if (uri.getScheme() == null)
        if (uri.getScheme() == null || !"ivo".equals(uri.getScheme()))
        {
            throw new IllegalArgumentException("GroupURI scheme is required.");
            throw new IllegalArgumentException("GroupURI scheme must be 'ivo'.");
        }

        if (uri.getAuthority() == null)
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,9 @@ public class GroupURITest
            // no scheme
            assertIllegalArgument("example.org/gms?gname", "scheme");
            
            // wrong scheme
            assertIllegalArgument("gms://example.org/gms?gname", "scheme");

            // no authority
            assertIllegalArgument("ivo://gms?gname", "authority");