return allProjects;
}
private String calculateMD5(File file) {
String hash = null;
MD5OutputStream stream = null;
try {
Element element = Util.loadConfigFile(file);
stream = new MD5OutputStream(new ByteArrayOutputStream());
XMLOutputter outputter = new XMLOutputter();
outputter.output(element, stream);
hash = stream.getMD5().asHex();
} catch (IOException e) {
LOG.error("exception calculating MD5 of config file " + file.getAbsolutePath(), e);
} catch (CruiseControlException e) {
LOG.error("exception calculating MD5 of config file " + file.getAbsolutePath(), e);
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException ignore) {
}
}
}
return hash;