aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notification
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-07-06 17:46:17 -0700
committerAnton Tananaev <anton@traccar.org>2024-07-06 17:46:17 -0700
commitb8390005722dd1cdb24d762797ef3f98ebc37755 (patch)
treecaabf1a7541aebc4e81565e95ee78e2d8afe3d75 /src/main/java/org/traccar/notification
parent75e3c6a6bbb028b2f99b06faac66d5b53cf59900 (diff)
downloadtrackermap-server-b8390005722dd1cdb24d762797ef3f98ebc37755.tar.gz
trackermap-server-b8390005722dd1cdb24d762797ef3f98ebc37755.tar.bz2
trackermap-server-b8390005722dd1cdb24d762797ef3f98ebc37755.zip
Update instanceof expressions
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;
}