CPD Results

The following document contains the results of PMD's CPD 3.9.

Duplications

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() {