You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/04/05 16:30:14 UTC

[maven-checkstyle-plugin] branch master updated: (doc) Remove unnecessary casts (#30)

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

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 36bde8d  (doc) Remove unnecessary casts (#30)
36bde8d is described below

commit 36bde8d75aba5e109637bb0762965f76fbb027b2
Author: Piotrek Żygieło <pz...@users.noreply.github.com>
AuthorDate: Sun Apr 5 18:30:09 2020 +0200

    (doc) Remove unnecessary casts (#30)
    
    https://rules.sonarsource.com/java/type/Code%20Smell/RSPEC-1905
---
 .../org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java   | 2 +-
 .../apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java   | 2 +-
 .../maven/plugins/checkstyle/resource/LicenseResourceManager.java       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
index 85586f6..3b958ff 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java
@@ -604,7 +604,7 @@ public abstract class AbstractCheckstyleReport
             {
              // @todo if we can filter on hints, it should be done here...
                 String depKey = dep.getGroupId() + ":" + dep.getArtifactId();
-                artifacts.add( (Artifact) plugin.getArtifactMap().get( depKey ) );
+                artifacts.add( plugin.getArtifactMap().get( depKey ) );
             }
         }
         return artifacts;
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
index a9581fe..b9c47d7 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
@@ -852,7 +852,7 @@ public class CheckstyleViolationCheckMojo
             {
              // @todo if we can filter on hints, it should be done here...
                 String depKey = dep.getGroupId() + ":" + dep.getArtifactId();
-                artifacts.add( (Artifact) plugin.getArtifactMap().get( depKey ) );
+                artifacts.add( plugin.getArtifactMap().get( depKey ) );
             }
         }
         return artifacts;
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java b/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java
index e1bf57a..aa8cefc 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/resource/LicenseResourceManager.java
@@ -46,7 +46,7 @@ public class LicenseResourceManager
     @Override
     public void addSearchPath( String id, String path )
     {
-        ResourceLoader loader = (ResourceLoader) resourceLoaders.get( id );
+        ResourceLoader loader = resourceLoaders.get( id );
 
         if ( loader == null )
         {