From 8289a0b1097f02a99d62f4f7750e6b46a54a54fc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Feb 2024 16:02:43 +0300 Subject: Append IDEA code suggestions --- .../mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/com/mitchellbosecke/pebble/extension') diff --git a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java index 009cc83a..1ecfd40d 100644 --- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java +++ b/src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java @@ -34,8 +34,7 @@ import java.util.Map; public class FormatMessageFilter implements Filter { @Override public Object apply(Object input, Map args, PebbleTemplate self, EvaluationContext context, int lineNumber) { - if (input instanceof Message) { - Message msg = (Message) input; + if (input instanceof Message msg) { if (msg.isHtml()) { return new SafeString(msg.getText()); } -- cgit v1.2.3