Skip to content

getPreviouslyAttached() in AbstractSourceJarMojo is unused dead code #305

Description

@elharo

AbstractSourceJarMojo.java:330-336 contains a private method getPreviouslyAttached() that is never called anywhere in the codebase:

private Artifact getPreviouslyAttached(Artifact artifact, Project checkProject, String classifier) {
    return artifact.getExtension().equals(getExtension())
                    && artifact.getGroupId().equals(checkProject.getGroupId())
                    && artifact.getArtifactId().equals(checkProject.getArtifactId())
                    && artifact.getVersion().toString().equals(checkProject.getVersion())
                    && Objects.equals(artifact.getClassifier(), classifier)
            ? artifact
            : null;
}

This is dead code and should be removed to avoid confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions