Skip to content

Commit

Permalink
Change Boolean -> boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmccloskey committed Nov 28, 2023
1 parent 10ad931 commit c3dadde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/meta/cp4m/message/FBMessageHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class FBMessageHandler implements MessageHandler<FBMessage> {
private final String appSecret;

private final String accessToken;
private final Boolean isInstagram;
private final boolean isInstagram;

private final Deduplicator<Identifier> messageDeduplicator = new Deduplicator<>(10_000);
private Function<Identifier, URI> baseURLFactory =
Expand All @@ -63,7 +63,7 @@ public class FBMessageHandler implements MessageHandler<FBMessage> {
}
};

public FBMessageHandler(String verifyToken, String pageAccessToken, String appSecret, Boolean isInstagram) {
public FBMessageHandler(String verifyToken, String pageAccessToken, String appSecret, boolean isInstagram) {
this.verifyToken = verifyToken;
this.appSecret = appSecret;
this.accessToken = pageAccessToken;
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/meta/cp4m/message/FBMessengerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public class FBMessengerConfig implements HandlerConfig {
private final String verifyToken;
private final String appSecret;
private final String pageAccessToken;
private final Boolean isInstagram;
private final boolean isInstagram;

private FBMessengerConfig(
@JsonProperty("name") String name,
@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,10 +40,10 @@ private FBMessengerConfig(
this.verifyToken = verifyToken;
this.appSecret = appSecret;
this.pageAccessToken = pageAccessToken;
this.isInstagram = isInstagram != null ? isInstagram : false;
this.isInstagram = isInstagram;
}

public static FBMessengerConfig of(String verifyToken, String appSecret, String pageAccessToken, Boolean isInstagram) {
public static FBMessengerConfig of(String verifyToken, String appSecret, String pageAccessToken, boolean isInstagram) {
// human readability of the name only matters when it's coming from a config
return new FBMessengerConfig(
UUID.randomUUID().toString(), verifyToken, appSecret, pageAccessToken, isInstagram);
Expand Down Expand Up @@ -71,7 +71,7 @@ public String pageAccessToken() {
return pageAccessToken;
}

public Boolean isInstagram() {
public boolean isInstagram() {
return isInstagram;
}
}

0 comments on commit c3dadde

Please sign in to comment.