aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/mitchellbosecke/pebble/extension
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-02-09 16:02:43 +0300
committerGravatar Vitaly Takmazov2024-02-09 16:02:43 +0300
commit8289a0b1097f02a99d62f4f7750e6b46a54a54fc (patch)
treebe0e04b409757be58d5a39fbde93ce3d96b02142 /src/main/java/com/mitchellbosecke/pebble/extension
parentb11525961a8bf68355f3e4728375b209a91f6787 (diff)
Append IDEA code suggestions
Diffstat (limited to 'src/main/java/com/mitchellbosecke/pebble/extension')
-rw-r--r--src/main/java/com/mitchellbosecke/pebble/extension/filters/FormatMessageFilter.java3
1 files changed, 1 insertions, 2 deletions
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<String, Object> 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());
}