aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notification
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/notification')
-rw-r--r--src/main/java/org/traccar/notification/PropertiesProvider.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/notification/PropertiesProvider.java b/src/main/java/org/traccar/notification/PropertiesProvider.java
index 91887b5d4..5178b9a9e 100644
--- a/src/main/java/org/traccar/notification/PropertiesProvider.java
+++ b/src/main/java/org/traccar/notification/PropertiesProvider.java
@@ -48,7 +48,7 @@ public class PropertiesProvider {
} else {
Object result = extendedModel.getAttributes().get(key.getKey());
if (result != null) {
- return result instanceof String ? Integer.parseInt((String) result) : (Integer) result;
+ return result instanceof String stringResult ? Integer.parseInt(stringResult) : (Integer) result;
} else {
return key.getDefaultValue();
}
@@ -65,7 +65,7 @@ public class PropertiesProvider {
} else {
Object result = extendedModel.getAttributes().get(key.getKey());
if (result != null) {
- return result instanceof String ? Boolean.valueOf((String) result) : (Boolean) result;
+ return result instanceof String stringResult ? Boolean.valueOf(stringResult) : (Boolean) result;
} else {
return null;
}