Skip to content

Commit

Permalink
Break dependency on commons-lang3
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Nov 19, 2024
1 parent dd1b5b9 commit 63e31b5
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import java.io.File;

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugins.dependency.fromConfiguration.ArtifactItem;
import org.apache.maven.plugins.dependency.utils.markers.UnpackFileMarkerHandler;

Expand All @@ -29,21 +28,22 @@ public StubUnpackFileMarkerHandler(ArtifactItem artifactItem, File markerFilesDi
super(artifactItem, markerFilesDirectory);
}

@Override
protected File getMarkerFile() {
File markerFile;
if (this.artifactItem == null
|| (StringUtils.isEmpty(this.artifactItem.getIncludes())
&& StringUtils.isEmpty(this.artifactItem.getExcludes()))) {
|| this.artifactItem.getIncludes().isEmpty()
&& this.artifactItem.getExcludes().isEmpty()) {
markerFile = new StubMarkerFile(
this.markerFilesDirectory, this.artifact.getId().replace(':', '-') + ".marker");
} else {
int includeExcludeHash = 0;

if (StringUtils.isNotEmpty(this.artifactItem.getIncludes())) {
if (!this.artifactItem.getIncludes().isEmpty()) {
includeExcludeHash += this.artifactItem.getIncludes().hashCode();
}

if (StringUtils.isNotEmpty(this.artifactItem.getExcludes())) {
if (!this.artifactItem.getExcludes().isEmpty()) {
includeExcludeHash += this.artifactItem.getExcludes().hashCode();
}

Expand Down

0 comments on commit 63e31b5

Please sign in to comment.