aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2024-05-16 08:44:07 -0700
committerGitHub <noreply@github.com>2024-05-16 08:44:07 -0700
commit39d0cb2f449c3fcd3ac28f2cd5ead8054c256b4e (patch)
tree95e1324866554e5b4152691d0e597ff0f0ccdfaa /src/main
parent6016ef5effa5a5f826e8f77bc8277897fec6e878 (diff)
parent6879f2bcd6026d279826d3672e58ffca2b2e947e (diff)
downloadtrackermap-server-39d0cb2f449c3fcd3ac28f2cd5ead8054c256b4e.tar.gz
trackermap-server-39d0cb2f449c3fcd3ac28f2cd5ead8054c256b4e.tar.bz2
trackermap-server-39d0cb2f449c3fcd3ac28f2cd5ead8054c256b4e.zip
Merge pull request #5320 from memesaregood1/master
Allow Date class in the JEXL Sandbox.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/handler/ComputedAttributesHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
index 4293bd1fc..7c2fd70a5 100644
--- a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
+++ b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
@@ -41,6 +41,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.Date;
public class ComputedAttributesHandler extends BasePositionHandler {
@@ -63,7 +64,7 @@ public class ComputedAttributesHandler extends BasePositionHandler {
sandbox.allow(Math.class.getName());
List.of(
Double.class, Float.class, Integer.class, Long.class, Short.class,
- Character.class, Boolean.class, String.class, Byte.class)
+ Character.class, Boolean.class, String.class, Byte.class, Date.class)
.forEach((type) -> sandbox.allow(type.getName()));
features = new JexlFeatures()
.localVar(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOCAL_VARIABLES))