aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/notificators
diff options
context:
space:
mode:
authorkamaci <furkankamaci@gmail.com>2020-10-19 00:01:12 +0300
committerkamaci <furkankamaci@gmail.com>2020-10-19 00:01:12 +0300
commit3cd7831692b1725713e297372a0181e5ae614eb9 (patch)
tree46725cd3575e53ff9ff40b44236b34a323f804ac /src/main/java/org/traccar/notificators
parent98c2e3da5ea0670360078a3f278ddef7d9e39953 (diff)
downloadtrackermap-server-3cd7831692b1725713e297372a0181e5ae614eb9.tar.gz
trackermap-server-3cd7831692b1725713e297372a0181e5ae614eb9.tar.bz2
trackermap-server-3cd7831692b1725713e297372a0181e5ae614eb9.zip
Anonymous types are replaced with lambda.
Diffstat (limited to 'src/main/java/org/traccar/notificators')
-rw-r--r--src/main/java/org/traccar/notificators/Notificator.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/notificators/Notificator.java b/src/main/java/org/traccar/notificators/Notificator.java
index 5e40971c6..dd888bae9 100644
--- a/src/main/java/org/traccar/notificators/Notificator.java
+++ b/src/main/java/org/traccar/notificators/Notificator.java
@@ -27,13 +27,11 @@ public abstract class Notificator {
private static final Logger LOGGER = LoggerFactory.getLogger(Notificator.class);
public void sendAsync(final long userId, final Event event, final Position position) {
- new Thread(new Runnable() {
- public void run() {
- try {
- sendSync(userId, event, position);
- } catch (MessageException | InterruptedException error) {
- LOGGER.warn("Event send error", error);
- }
+ new Thread(() -> {
+ try {
+ sendSync(userId, event, position);
+ } catch (MessageException | InterruptedException error) {
+ LOGGER.warn("Event send error", error);
}
}).start();
}