You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/17 13:33:34 UTC

[commons-release-plugin] branch master updated: Use Generics, not type casts

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-release-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b64f48  Use Generics, not type casts
5b64f48 is described below

commit 5b64f485e1340c2aef6bc446ee2fde6349c4c1df
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 17 09:33:30 2022 -0400

    Use Generics, not type casts
---
 .../release/plugin/mojos/CommonsDistributionDetachmentMojo.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
index 67fd179..2daa666 100755
--- a/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
+++ b/src/main/java/org/apache/commons/release/plugin/mojos/CommonsDistributionDetachmentMojo.java
@@ -122,10 +122,10 @@ public class CommonsDistributionDetachmentMojo extends AbstractMojo {
             return;
         }
         getLog().info("Detaching Assemblies");
-        for (final Object attachedArtifact : project.getAttachedArtifacts()) {
-            putAttachedArtifactInSha512Map((Artifact) attachedArtifact);
-            if (ARTIFACT_TYPES_TO_DETACH.contains(((Artifact) attachedArtifact).getType())) {
-                detachedArtifacts.add((Artifact) attachedArtifact);
+        for (final Artifact attachedArtifact : project.getAttachedArtifacts()) {
+            putAttachedArtifactInSha512Map(attachedArtifact);
+            if (ARTIFACT_TYPES_TO_DETACH.contains(attachedArtifact.getType())) {
+                detachedArtifacts.add(attachedArtifact);
             }
         }
         if (detachedArtifacts.isEmpty()) {