Make URL conversion null-safe

pull/55/head
Richard Körber 2017-04-19 00:47:57 +02:00
parent f38002ca06
commit f2cd592b2e
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ public class DefaultConnection implements Connection {
*/
private static URL toURL(URI uri) {
try {
return uri.toURL();
return uri != null ? uri.toURL() : null;
} catch (MalformedURLException ex) {
throw new AcmeProtocolException("Invalid URL: " + uri, ex);
}