File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
google-http-client-jackson2/src/main/java/com/google/api/client/json/jackson2 Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 39
39
public final class JacksonFactory extends JsonFactory {
40
40
41
41
/** JSON factory. */
42
- private final com .fasterxml .jackson .core .JsonFactory factory =
43
- new com .fasterxml .jackson .core .JsonFactory ();
42
+ private final com .fasterxml .jackson .core .JsonFactory factory ;
44
43
45
- {
44
+ public JacksonFactory () {
45
+ factory = new com .fasterxml .jackson .core .JsonFactory ();
46
46
// don't auto-close JSON content in order to ensure consistent behavior across JSON factories
47
47
// TODO(rmistry): Should we disable the JsonGenerator.Feature.AUTO_CLOSE_TARGET feature?
48
48
factory .configure (
@@ -60,7 +60,10 @@ public static JacksonFactory getDefaultInstance() {
60
60
61
61
/** Holder for the result of {@link #getDefaultInstance()}. */
62
62
static class InstanceHolder {
63
- static final JacksonFactory INSTANCE = new JacksonFactory ();
63
+ static final JacksonFactory INSTANCE ;
64
+ static {
65
+ INSTANCE = new JacksonFactory ();
66
+ }
64
67
}
65
68
66
69
@ Override
You can’t perform that action at this time.
0 commit comments