private void mergeEnvironment(JobSpecification js, Map env) { Iterator i = js.getEnvironmentVariableNames().iterator(); while (i.hasNext()) { String envName = (String) i.next(); env.put(envName, js.getEnvironmentVariable(envName)); } }
private boolean detectEnvironmentConflict(JobSpecification js, Map env) { Iterator i = js.getEnvironmentVariableNames().iterator(); while (i.hasNext()) { String envName = (String) i.next(); Object value = env.get(envName); if (value != null && !value.equals(js.getEnvironmentVariable(envName))) { return true; } } return false; }
private String getJavaHome(Task task) { JobSpecification js = (JobSpecification) task.getSpecification(); return js.getEnvironmentVariable("JAVA_HOME"); }