fix NPE setting locale

This commit is contained in:
Grahame Grieve 2022-01-13 05:14:36 +11:00
parent 7d3f34b0ca
commit c661dae9f5
2 changed files with 5 additions and 2 deletions

View File

@ -147,7 +147,10 @@ public class ResourceUtilities {
if (cc.hasCoding("http://unstats.un.org/unsd/methods/m49/m49.htm", "001")) {
return new Locale("en-US");
}
String c = cc.getCode("urn:iso:std:iso:3166:-2");
String c = cc.getCode("urn:iso:std:iso:3166");
if (c == null) {
return null;
}
String l = jl.get(c);
if (l == null) {
return null;

View File

@ -110,7 +110,7 @@ public class SimpleHTTPClient {
public HTTPResult get(String url, String accept) throws IOException {
URL u = new URL(url);
boolean isSSL = url.startsWith("https://");
// boolean isSSL = url.startsWith("https://");
// handling redirects - setInstanceFollowRedirects(true) doesn't handle crossing http to https