mirror of https://github.com/shred/acme4j
Fix NPE when server sent no TOS header
parent
cf5b05bf73
commit
090bbdd34a
|
@ -427,7 +427,8 @@ public class DefaultConnection implements Connection {
|
|||
}
|
||||
|
||||
if ("userActionRequired".equals(error)) {
|
||||
URI tos = getLinks("terms-of-service").stream().findFirst().orElse(null);
|
||||
Collection<URI> links = getLinks("terms-of-service");
|
||||
URI tos = links != null ? links.stream().findFirst().orElse(null) : null;
|
||||
return new AcmeUserActionRequiredException(problem, tos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue