Commits

Anonymous committed ce15700

Fixed ScriptApplicator behavior when no script is available

  • Participants
  • Parent commits 25bc274

Comments (0)

Files changed (1)

ecat-edit/src/main/java/org/nrg/ecat/edit/ScriptApplicator.java

 	}
 
 	public Map getVariables() {
-		return astParser.getVariables();
+		return null == astParser ? Collections.EMPTY_MAP : astParser.getVariables();
 	}
 
 	public List getSortedVariables(final Collection excluding) {
+		if (null == astParser) {
+			return Collections.EMPTY_LIST;
+		}
+		
 		final Map graph = new LinkedHashMap();
 		for (final Iterator i = astParser.getVariables().values().iterator(); i.hasNext(); ) {
 			final Variable v = (Variable)i.next();
 	}
 
 	public List getSortedVariables() {
-		return this.getSortedVariables(Collections.EMPTY_LIST);
+		return getSortedVariables(Collections.EMPTY_LIST);
 	}
 }