mirror of https://github.com/shred/acme4j
Return null if no URI is set
parent
181042c42b
commit
04fe570811
|
@ -60,8 +60,13 @@ public class GenericChallenge implements Challenge {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public URI getUri() {
|
public URI getUri() {
|
||||||
|
String uri = get(KEY_URI);
|
||||||
|
if (uri == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return new URI(get(KEY_URI).toString());
|
return new URI(uri);
|
||||||
} catch (URISyntaxException ex) {
|
} catch (URISyntaxException ex) {
|
||||||
throw new IllegalStateException("Invalid URI", ex);
|
throw new IllegalStateException("Invalid URI", ex);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue