CPD Results
The following document contains the results of PMD's CPD 3.9.
Duplications
| File | Line |
|---|
| net/sf/ehcache/distribution/RMIAsynchronousCacheReplicator.java | 303 |
| net/sf/ehcache/distribution/jgroups/JGroupsCacheReplicator.java | 412 |
List cachePeers = listRemoteCachePeers(cache);
for (int j = 0; j < cachePeers.size(); j++) {
CachePeer cachePeer = (CachePeer) cachePeers.get(j);
try {
cachePeer.send(resolvedEventMessages);
} catch (UnmarshalException e) {
String message = e.getMessage();
if (message.indexOf("Read time out") != 0) {
LOG.warn("Unable to send message to remote peer due to socket read timeout. Consider increasing"
+ " the socketTimeoutMillis setting in the cacheManagerPeerListenerFactory. " + "Message was: "
+ e.getMessage());
} else {
LOG.debug("Unable to send message to remote peer. Message was: " + e.getMessage());
}
} catch (Throwable t) {
LOG.warn("Unable to send message to remote peer. Message was: " + t.getMessage(), t);
}
} |
| File | Line |
|---|
| net/sf/ehcache/hibernate/EhCacheProvider.java | 148 |
| net/sf/ehcache/hibernate/SingletonEhCacheProvider.java | 136 |
}
}
private URL loadResource(String configurationResourceName) {
ClassLoader standardClassloader = ClassLoaderUtil.getStandardClassLoader();
URL url = null;
if (standardClassloader != null) {
url = standardClassloader.getResource(configurationResourceName);
}
if (url == null) {
url = this.getClass().getResource(configurationResourceName);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Creating EhCacheProvider from a specified resource: "
+ configurationResourceName + " Resolved to URL: " + url);
}
if (url == null) {
if (LOG.isWarnEnabled()) {
LOG.warn("A configurationResourceName was set to " + configurationResourceName +
" but the resource could not be loaded from the classpath." +
"Ehcache will configure itself using defaults.");
}
}
return url;
}
/**
* Callback to perform any necessary cleanup of the underlying cache implementation
* during SessionFactory.close().
*/
public void stop() { |
| File | Line |
|---|
| net/sf/ehcache/distribution/RMIAsynchronousCacheReplicator.java | 99 |
| net/sf/ehcache/distribution/jgroups/JGroupsCacheReplicator.java | 356 |
}
private void replicationThreadMain() {
while (true) {
// Wait for elements in the replicationQueue
while (alive() && replicationQueue != null && replicationQueue.size() == 0) {
try {
Thread.sleep(asynchronousReplicationInterval);
} catch (InterruptedException e) {
LOG.debug("Spool Thread interrupted.");
return;
}
}
if (notAlive()) {
return;
}
try {
if (replicationQueue.size() != 0) {
flushReplicationQueue();
}
} catch (Throwable e) {
LOG.warn("Exception on flushing of replication queue: " + e.getMessage() + ". Continuing...", e);
}
}
} |