in src/java/org/apache/fulcrum/yaafi/service/reconfiguration/ReconfigurationEntry.java [77:125]
public boolean hasChanged() {
boolean result = false;
InputStream is = null;
byte[] currDigest = null;
try {
// get a grip on our resource
is = this.locate();
if (is == null) {
String msg = "Unable to find the following resource : " + this.getLocation();
this.logger.warn(msg);
} else {
// calculate a SHA-1 digest
currDigest = this.getDigest(is);
is.close();
is = null;
if (this.isFirstInvocation() == true) {
isFirstInvocation = false;
this.logger.debug("Storing SHA-1 digest of " + this.getLocation());
this.setDigest(currDigest);
} else {
if (equals(this.digest, currDigest) == false) {
this.logger.debug("The following resource has changed : " + this.getLocation());
this.setDigest(currDigest);
result = true;
}
}
}
return result;
} catch (Exception e) {
String msg = "The ShutdownService encountered an internal error";
this.logger.error(msg, e);
return false;
} finally {
if (is != null) {
try {
is.close();
} catch (Exception e) {
String msg = "Can't close the InputStream during error recovery";
this.logger.error(msg, e);
}
}
}
}