CPD Results

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

Duplications

File Line
org/apache/maven/artifact/resolver/ArtifactResolutionResult.java 258
org/apache/maven/repository/MetadataResolutionResult.java 235
public ArtifactResolutionResult addCircularDependencyException(CyclicDependencyException e) {
        circularDependencyExceptions = initList(circularDependencyExceptions);

        circularDependencyExceptions.add(e);

        exceptions = initList(exceptions);

        exceptions.add(e);

        return this;
    }

    public CyclicDependencyException getCircularDependencyException(int i) {
        return circularDependencyExceptions.get(i);
    }

    public List<CyclicDependencyException> getCircularDependencyExceptions() {
        if (circularDependencyExceptions == null) {
            return Collections.emptyList();
        }

        return Collections.unmodifiableList(circularDependencyExceptions);
    }

    // ------------------------------------------------------------------------
    // Repositories
    // ------------------------------------------------------------------------

    public List<ArtifactRepository> getRepositories() {
        if (repositories == null) {
            return Collections.emptyList();
        }

        return Collections.unmodifiableList(repositories);
    }

    public ArtifactResolutionResult setRepositories(final List<ArtifactRepository> repositories) {
File Line
org/apache/maven/plugin/internal/DefaultPluginManager.java 97
org/apache/maven/plugin/internal/DefaultPluginManager.java 121
throws PluginManagerException, ComponentLookupException {
        MavenSession session = legacySupport.getSession();

        PluginDescriptor pluginDescriptor;
        try {
            pluginDescriptor = pluginManager.getPluginDescriptor(
                    plugin, session.getCurrentProject().getRemotePluginRepositories(), session.getRepositorySession());

            pluginManager.setupPluginRealm(pluginDescriptor, session, null, null, null);
        } catch (Exception e) {
            throw new PluginManagerException(plugin, e.getMessage(), e);
        }

        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        try {
            Thread.currentThread().setContextClassLoader(pluginDescriptor.getClassRealm());

            return container.lookup(role, roleHint);
File Line
org/apache/maven/artifact/repository/ArtifactRepositoryFactory.java 30
org/apache/maven/repository/legacy/repository/ArtifactRepositoryFactory.java 29
String DEFAULT_LAYOUT_ID = "default";

    String LOCAL_REPOSITORY_ID = "local";

    @Deprecated
    ArtifactRepositoryLayout getLayout(String layoutId) throws UnknownRepositoryLayoutException;

    @Deprecated
    ArtifactRepository createDeploymentArtifactRepository(String id, String url, String layoutId, boolean uniqueVersion)
            throws UnknownRepositoryLayoutException;

    ArtifactRepository createDeploymentArtifactRepository(
            String id, String url, ArtifactRepositoryLayout layout, boolean uniqueVersion);

    ArtifactRepository createArtifactRepository(
            String id,
            String url,
            String layoutId,
            ArtifactRepositoryPolicy snapshots,
            ArtifactRepositoryPolicy releases)
            throws UnknownRepositoryLayoutException;

    ArtifactRepository createArtifactRepository(
            String id,
            String url,
            ArtifactRepositoryLayout repositoryLayout,
            ArtifactRepositoryPolicy snapshots,
            ArtifactRepositoryPolicy releases);

    void setGlobalUpdatePolicy(String snapshotPolicy);

    void setGlobalChecksumPolicy(String checksumPolicy);
}