Skip to content

Commit

Permalink
Fix null error for primitive boolean type
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmccloskey committed Nov 28, 2023
1 parent c3dadde commit 3331910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/meta/cp4m/message/FBMessengerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private FBMessengerConfig(
@JsonProperty("verify_token") String verifyToken,
@JsonProperty("app_secret") String appSecret,
@JsonProperty("page_access_token") String pageAccessToken,
@JsonProperty("is_instagram") boolean isInstagram) {
@JsonProperty("is_instagram") Boolean isInstagram) {

Preconditions.checkArgument(name != null && !name.isBlank(), "name cannot be blank");
Preconditions.checkArgument(
Expand All @@ -40,7 +40,7 @@ private FBMessengerConfig(
this.verifyToken = verifyToken;
this.appSecret = appSecret;
this.pageAccessToken = pageAccessToken;
this.isInstagram = isInstagram;
this.isInstagram = isInstagram != null ? isInstagram : false;
}

public static FBMessengerConfig of(String verifyToken, String appSecret, String pageAccessToken, boolean isInstagram) {
Expand Down

0 comments on commit 3331910

Please sign in to comment.