File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
google-http-client/src/main/java/com/google/api/client/util/store Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 24
24
import java .io .FileOutputStream ;
25
25
import java .io .IOException ;
26
26
import java .io .Serializable ;
27
+ import java .lang .System .Logger .Level ;
27
28
import java .nio .file .Files ;
28
29
import java .nio .file .Path ;
29
30
import java .nio .file .Paths ;
37
38
import java .util .HashSet ;
38
39
import java .util .Locale ;
39
40
import java .util .Set ;
41
+ import java .util .logging .Logger ;
40
42
41
43
/**
42
44
* Thread-safe file implementation of a credential store.
@@ -56,8 +58,13 @@ public class FileDataStoreFactory extends AbstractDataStoreFactory {
56
58
57
59
private static final boolean IS_WINDOWS ;
58
60
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
+ }
61
68
}
62
69
63
70
/** Directory to store data. */
You can’t perform that action at this time.
0 commit comments