From 8f1f7b94b81df08f62b7c558dbff44b1f486f65d Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 5 Mar 2024 18:29:35 +0100 Subject: [PATCH] Flip equals to get rid of immediate NPE in #507 To followup with a more thorough fix if we learn more about the usage there. --- .../openrewrite/java/spring/security6/UpdateRequestCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/java/spring/security6/UpdateRequestCache.java b/src/main/java/org/openrewrite/java/spring/security6/UpdateRequestCache.java index 1f324038d..09f04fac6 100644 --- a/src/main/java/org/openrewrite/java/spring/security6/UpdateRequestCache.java +++ b/src/main/java/org/openrewrite/java/spring/security6/UpdateRequestCache.java @@ -143,7 +143,7 @@ private static boolean isContinueParameterStatement(Statement statement) { if (CONTINUE_PARAMETER_MATCHER.matches(m)) { if (m.getArguments().get(0) instanceof J.Literal) { - return ((J.Literal) m.getArguments().get(0)).getValue().equals("continue"); + return "continue".equals(((J.Literal) m.getArguments().get(0)).getValue()); } } }