From 83feb6ad13187af9be55cc71408611f67d280955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Tue, 14 Jan 2020 21:28:10 +0100 Subject: Fix timestamps and ValueQuery --- .../java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java index affad86..bd3f524 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/NewApiImplementation.java @@ -82,8 +82,8 @@ public class NewApiImplementation implements Api { QuerySignerApiImplementation.validateInstallQuery(name, query, this.publicKey); Attribute attributeName = new Attribute(name); ValueTime timestamp = new ValueTime(System.currentTimeMillis()); - Map> queries = new HashMap(); - queries.put(attributeName, new SimpleImmutableEntry(new ValueQuery(query), timestamp)); + Map queries = new HashMap(); + queries.put(attributeName, new ValueQuery(query)); UpdateQueriesMessage message = new UpdateQueriesMessage("", 0, queries); eventBus.addMessage(message); } catch (Exception e) { @@ -97,8 +97,8 @@ public class NewApiImplementation implements Api { QuerySignerApiImplementation.validateUninstallQuery(queryName, query, this.publicKey); Attribute attributeName = new Attribute(queryName); ValueTime timestamp = new ValueTime(System.currentTimeMillis()); - Map> queries = new HashMap(); - queries.put(attributeName, new SimpleImmutableEntry(null, timestamp)); + Map queries = new HashMap(); + queries.put(attributeName, new ValueQuery(query)); UpdateQueriesMessage message = new UpdateQueriesMessage("", 0, queries); eventBus.addMessage(message); } catch (Exception e) { -- cgit v1.2.3