diff options
Diffstat (limited to 'src/main/java/pl/edu')
-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()); } } |