diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2019-12-31 14:54:02 +0100 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2019-12-31 14:54:02 +0100 |
commit | 393f087e7e3d2e3a636ae0ffeb075c2354ff0966 (patch) | |
tree | d32ece657f423b5b5e1417b01a8771bcb28765fc /src/main/java/pl/edu/mimuw/cloudatlas/agent | |
parent | cc3c39501d22a7901e3f6d164d040a08c7d897a7 (diff) |
Handle removed queries in Qurnik
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/agent')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java index 9b7268a..1ab8a16 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/agent/modules/Qurnik.java @@ -80,13 +80,15 @@ public class Qurnik extends Module { Interpreter interpreter = new Interpreter(zmi); AttributesMap newAttributes = new AttributesMap(); for (ValueQuery query : queries) { - try { - List<QueryResult> result = interpreter.interpretProgram(query.getQuery()); - for(QueryResult r : result) { - newAttributes.addOrChange(r.getName(), r.getValue()); + if (query != null) { + try { + List<QueryResult> result = interpreter.interpretProgram(query.getQuery()); + for(QueryResult r : result) { + newAttributes.addOrChange(r.getName(), r.getValue()); + } + } catch(InterpreterException exception) { + System.out.println("ERROR: thrown while running interpreter: " + exception.getMessage()); } - } catch(InterpreterException exception) { - System.out.println("ERROR: thrown while running interpreter: " + exception.getMessage()); } } |