From 826bb2ba7dc2745d9b187deef30e6611e6dbf1ce Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Mon, 22 May 2023 15:28:33 +0000 Subject: [PATCH] [MNG-6829] Replace StringUtils#isEmpty(String) & #isNotEmpty(String) Last batch of is(Not)Empty for https://issues.apache.org/jira/browse/MNG-6829 These are the smallest change sets, hence why I opened more at the same time. After this we can target the next most often used method from the StringUtils classes. Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu Co-authored-by: Moderne --- .../java/org/apache/maven/plugins/deploy/DeployFileMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java index c6c875b1..7de11c83 100644 --- a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java +++ b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java @@ -269,7 +269,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { ArtifactType artifactType = session.getRepositorySession().getArtifactTypeRegistry().get(packaging); if (artifactType != null - && StringUtils.isEmpty(classifier) + && (classifier == null || classifier.isEmpty()) && !StringUtils.isEmpty(artifactType.getClassifier())) { classifier = artifactType.getClassifier(); }