Skip to content

Commit

Permalink
StringUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Nov 24, 2024
1 parent 8324695 commit fb3529b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.LinkedHashSet;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugins.dependency.fromConfiguration.ArtifactItem;
import org.apache.maven.plugins.dependency.utils.DependencyUtil;
Expand Down Expand Up @@ -284,7 +283,7 @@ public boolean isArtifactIncluded(ArtifactItem item) throws ArtifactFilterExcept
}

File destFile;
if (StringUtils.isEmpty(item.getDestFileName())) {
if (item.getDestFileName() == null || item.getDestFileName().isEmpty()) {
String formattedFileName = DependencyUtil.getFormattedFileName(
artifact, removeVersion, prependGroupId, useBaseVersion, removeClassifier);
destFile = new File(destFolder, formattedFileName);
Expand All @@ -298,13 +297,13 @@ public boolean isArtifactIncluded(ArtifactItem item) throws ArtifactFilterExcept
}

/**
* Using simply {@code File.getLastModified} will return sometimes a wrong value see JDK bug for details.
* {@code File.getLastModified} sometimes returns a wrong value. See JDK bug for details.
* <p>
* https://bugs.openjdk.java.net/browse/JDK-8177809
*
* @param file {@link File}
* @return the last modification time in milliseconds.
* @throws ArtifactFilterException in case of a IO Exception.
* @throws ArtifactFilterException in case of an IOException
*/
private long getLastModified(File file) throws ArtifactFilterException {
try {
Expand Down

0 comments on commit fb3529b

Please sign in to comment.