m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-01-11 13:08:21 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-01-11 13:08:21 +0100
commitb87f3adc2dd665b186866d2fb345819dba2d1f35 (patch)
tree6845a53aab8b5f2f54db15364afcc8efb181c605 /src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
parentf624f7350e0018060ad3f38be1c3988bc3fb0545 (diff)
parentf54068421c2b4883b3fbcc4e003d83ff528b5cc4 (diff)
Merge branch 'master' into gossip-girl-2
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
index 6761c94..3fca1d5 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Stanik.java
@@ -1,5 +1,6 @@
package pl.edu.mimuw.cloudatlas.agent.modules;
+import java.nio.file.Path;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -141,7 +142,11 @@ public class Stanik extends Module {
*/
public void handleSetAttribte(SetAttributeMessage message) {
try {
- ZMI zmi = hierarchy.findDescendant(new PathName(message.getPathName()));
+ PathName descendantPath = new PathName(message.getPathName());
+ if (!hierarchy.descendantExists(descendantPath)) {
+ addMissingZones(descendantPath);
+ }
+ ZMI zmi = hierarchy.findDescendant(descendantPath);
ValueTime updateTimestamp = message.getUpdateTimestamp();
ValueTime currentTimestamp = (ValueTime) zmi.getAttributes().getOrNull("timestamp");
if (ValueUtils.valueLower(currentTimestamp, updateTimestamp)) {