Skip to content

Commit 3b27435

Browse files
committed
Merge branch 'renovate/com.google.cloud-native-image-shared-config-1.x' of https://github.com/renovate-bot/google-http-java-client into renovate/com.google.cloud-native-image-shared-config-1.x
2 parents 9455b69 + c70dbd1 commit 3b27435

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.io.FileOutputStream;
2525
import java.io.IOException;
2626
import java.io.Serializable;
27+
import java.lang.System.Logger.Level;
2728
import java.nio.file.Files;
2829
import java.nio.file.Path;
2930
import java.nio.file.Paths;
@@ -37,6 +38,7 @@
3738
import java.util.HashSet;
3839
import java.util.Locale;
3940
import java.util.Set;
41+
import java.util.logging.Logger;
4042

4143
/**
4244
* Thread-safe file implementation of a credential store.
@@ -56,8 +58,13 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory {
5658

5759
private static final boolean IS_WINDOWS;
5860
static {
59-
IS_WINDOWS =
60-
StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows");
61+
try {
62+
IS_WINDOWS =
63+
StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows");
64+
} catch (Throwable ex) {
65+
Logger.getLogger(FileDataStoreFactory.class.getName()).severe(ex.getMessage());
66+
throw ex;
67+
}
6168
}
6269

6370
/** Directory to store data. */

0 commit comments

Comments
 (0)