aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authormemesaregood1 <sifepe4679@yandex.ru>2023-02-22 07:20:49 +0300
committermemesaregood1 <sifepe4679@yandex.ru>2023-02-22 07:20:49 +0300
commit5bed640e8b87526a077d6a8411cddfac9c8661ae (patch)
tree85490ebaa8be5ba29c54ca00eaef535818bc4929 /src/main
parent99bbdac84d85ec57c9f7955ba353c86217e0dabc (diff)
downloadtrackermap-server-5bed640e8b87526a077d6a8411cddfac9c8661ae.tar.gz
trackermap-server-5bed640e8b87526a077d6a8411cddfac9c8661ae.tar.bz2
trackermap-server-5bed640e8b87526a077d6a8411cddfac9c8661ae.zip
note comments
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/handler/ComputedAttributesHandler.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
index 76f9c8f24..73b549195 100644
--- a/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
+++ b/src/main/java/org/traccar/handler/ComputedAttributesHandler.java
@@ -57,19 +57,15 @@ public class ComputedAttributesHandler extends BaseDataHandler {
private final boolean includeDeviceAttributes;
-
@Inject
public ComputedAttributesHandler(Config config, CacheManager cacheManager) {
this.cacheManager = cacheManager;
- boolean enableJEXLLocalVariables = config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOCAL_VARIABLES);
- boolean enableJEXLLoops = config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOOPS);
- boolean enableJEXLNewInstanceCreation = config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_NEW_INSTANCE_CREATION);
JexlSandbox sandbox = new JexlSandbox(false);
sandbox.allow("com.safe.Functions");
JexlFeatures features = new JexlFeatures()
- .localVar(enableJEXLLocalVariables)
- .loops(enableJEXLLoops)
- .newInstance(enableJEXLNewInstanceCreation)
+ .localVar(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOCAL_VARIABLES))
+ .loops(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_LOOPS))
+ .newInstance(config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_NEW_INSTANCE_CREATION))
.structuredLiteral(true);
engine = new JexlBuilder()
.strict(true)
@@ -78,7 +74,6 @@ public class ComputedAttributesHandler extends BaseDataHandler {
.features(features)
.create();
includeDeviceAttributes = config.getBoolean(Keys.PROCESSING_COMPUTED_ATTRIBUTES_DEVICE_ATTRIBUTES);
-
}
private MapContext prepareContext(Position position) {