CPD Results
The following document contains the results of PMD's CPD 6.38.0.
Duplications
File | Line |
---|---|
org/apache/fulcrum/yaafi/service/reconfiguration/ReconfigurationEntry.java | 72 |
org/apache/fulcrum/yaafi/service/shutdown/ShutdownEntry.java | 72 |
} /** * @return has the monitored location changed */ 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); } } } } /** * @return Returns the serviceList. */ public String[] getServiceList() { |