Skip to content

Commit 4e507a0

Browse files
committed
fix static initialization in AbstractDatastoreFactory
1 parent 3b27435 commit 4e507a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ public abstract class AbstractDataStoreFactory implements DataStoreFactory {
4141
* Pattern to control possible values for the {@code id} parameter of {@link
4242
* #getDataStore(String)}.
4343
*/
44-
private static final Pattern ID_PATTERN = Pattern.compile("\\w{1,30}");
44+
private static final Pattern ID_PATTERN;
45+
46+
static {
47+
ID_PATTERN = Pattern.compile("\\w{1,30}");
48+
}
4549

4650
public final <V extends Serializable> DataStore<V> getDataStore(String id) throws IOException {
4751
Preconditions.checkArgument(

0 commit comments

Comments
 (0)