Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OATS-CADC
ac
Commits
cf9becf1
Commit
cf9becf1
authored
Dec 01, 2016
by
bmajor
Committed by
GitHub
Dec 01, 2016
Browse files
Merge pull request #22 from pdowler/master
fix GroupURI to check that scheme is ivo
parents
e29bf705
e3d981bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
cadc-access-control/build.gradle
View file @
cf9becf1
...
@@ -15,7 +15,7 @@ sourceCompatibility = 1.7
...
@@ -15,7 +15,7 @@ sourceCompatibility = 1.7
group
=
'org.opencadc'
group
=
'org.opencadc'
version
=
'1.1.
3
'
version
=
'1.1.
4
'
mainClassName
=
'ca.nrc.cadc.ac.client.Main'
mainClassName
=
'ca.nrc.cadc.ac.client.Main'
...
...
cadc-access-control/src/main/java/ca/nrc/cadc/ac/GroupURI.java
View file @
cf9becf1
...
@@ -99,9 +99,9 @@ public class GroupURI
...
@@ -99,9 +99,9 @@ public class GroupURI
}
}
// Ensure the scheme is correct
// 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
)
if
(
uri
.
getAuthority
()
==
null
)
...
...
cadc-access-control/src/test/java/ca/nrc/cadc/ac/GroupURITest.java
View file @
cf9becf1
...
@@ -37,6 +37,9 @@ public class GroupURITest
...
@@ -37,6 +37,9 @@ public class GroupURITest
{
{
// no scheme
// no scheme
assertIllegalArgument
(
"example.org/gms?gname"
,
"scheme"
);
assertIllegalArgument
(
"example.org/gms?gname"
,
"scheme"
);
// wrong scheme
assertIllegalArgument
(
"gms://example.org/gms?gname"
,
"scheme"
);
// no authority
// no authority
assertIllegalArgument
(
"ivo://gms?gname"
,
"authority"
);
assertIllegalArgument
(
"ivo://gms?gname"
,
"authority"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment