Skip to content

Commit 6b0a708

Browse files
committed
initialize IS_WINDOWS at build time
1 parent c388a04 commit 6b0a708

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@
5454
*/
5555
public class FileDataStoreFactory extends AbstractDataStoreFactory {
5656

57-
private static final boolean IS_WINDOWS =
58-
StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows");
57+
private static final boolean IS_WINDOWS;
58+
static {
59+
IS_WINDOWS =
60+
StandardSystemProperty.OS_NAME.value().toLowerCase(Locale.ENGLISH).startsWith("windows");
61+
}
5962

6063
/** Directory to store data. */
6164
private final File dataDirectory;

0 commit comments

Comments
 (0)