🎨 fix GsonBuilder singleton NPE

This commit is contained in:
徐凯旋 2022-01-12 17:26:11 +08:00 committed by GitHub
parent ee17a5ee6f
commit 0601e8fb17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 165 additions and 165 deletions

View File

@ -29,7 +29,7 @@ public class WxGsonBuilder {
public static Gson create() {
if (Objects.isNull(GSON_INSTANCE)) {
synchronized (GSON_INSTANCE) {
synchronized (INSTANCE) {
if (Objects.isNull(GSON_INSTANCE)) {
GSON_INSTANCE = INSTANCE.create();
}

View File

@ -31,7 +31,7 @@ public class WxCpGsonBuilder {
public static Gson create() {
if (Objects.isNull(GSON_INSTANCE)) {
synchronized (GSON_INSTANCE) {
synchronized (INSTANCE) {
if (Objects.isNull(GSON_INSTANCE)) {
GSON_INSTANCE = INSTANCE.create();
}

View File

@ -34,7 +34,7 @@ public class WxMaGsonBuilder {
public static Gson create() {
if (Objects.isNull(GSON_INSTANCE)) {
synchronized (GSON_INSTANCE) {
synchronized (INSTANCE) {
if (Objects.isNull(GSON_INSTANCE)) {
GSON_INSTANCE = INSTANCE.create();
}

View File

@ -67,7 +67,7 @@ public class WxMpGsonBuilder {
public static Gson create() {
if (Objects.isNull(GSON_INSTANCE)) {
synchronized (GSON_INSTANCE) {
synchronized (INSTANCE) {
if (Objects.isNull(GSON_INSTANCE)) {
GSON_INSTANCE = INSTANCE.create();
}

View File

@ -32,7 +32,7 @@ public class WxOpenGsonBuilder {
public static Gson create() {
if (Objects.isNull(GSON_INSTANCE)) {
synchronized (GSON_INSTANCE) {
synchronized (INSTANCE) {
if (Objects.isNull(GSON_INSTANCE)) {
GSON_INSTANCE = INSTANCE.create();
}