From 656326355aadbcceb2f10bcecabeb236a75d9926 Mon Sep 17 00:00:00 2001 From: Chris Eager Date: Wed, 6 Sep 2023 21:48:55 -0500 Subject: [PATCH] Invert `String.equals()` to prevent `NullPointerException` --- .../textsecuregcm/controllers/SubscriptionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/SubscriptionController.java b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/SubscriptionController.java index 14f20c4bd..ba6530293 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/SubscriptionController.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/SubscriptionController.java @@ -546,7 +546,7 @@ public class SubscriptionController { lastSubscriptionCreatedAt) .exceptionally(e -> { if (e.getCause() instanceof StripeException stripeException - && stripeException.getCode().equals("subscription_payment_intent_requires_action")) { + && "subscription_payment_intent_requires_action".equals(stripeException.getCode())) { throw new BadRequestException(Response.status(Status.BAD_REQUEST) .entity(new SetSubscriptionLevelErrorResponse(List.of( new SetSubscriptionLevelErrorResponse.Error(