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; }