diff --git a/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java b/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java index a029d586..d86103b2 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java @@ -817,12 +817,7 @@ private static boolean isScmSystem(ScmRepository scmRepository, String scmProvid if (scmProvider == null || scmProvider.isEmpty()) { return false; } - - if (scmRepository != null && scmProvider.equalsIgnoreCase(scmRepository.getProvider())) { - return true; - } - - return false; + return scmRepository != null && scmProvider.equalsIgnoreCase(scmRepository.getProvider()); } } } diff --git a/src/main/java/org/apache/maven/report/projectinfo/SummaryReport.java b/src/main/java/org/apache/maven/report/projectinfo/SummaryReport.java index 7e78e513..a2cb3974 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/SummaryReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/SummaryReport.java @@ -225,11 +225,7 @@ private boolean isJavaProject(MavenProject project) { // maven-compiler-plugin ? Xpp3Dom pluginConfig = project.getGoalConfiguration("org.apache.maven.plugins", "maven-compiler-plugin", null, null); - if (pluginConfig != null) { - return true; - } - - return false; + return pluginConfig != null; } } } diff --git a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java index 6b9925fc..4981acc1 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java +++ b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java @@ -896,7 +896,7 @@ private void printDependencyListing(DependencyNode node) { if (!node.getChildren().isEmpty()) { boolean toBeIncluded = false; - List subList = new ArrayList(); + List subList = new ArrayList<>(); for (DependencyNode dep : node.getChildren()) { if (dependencies.getAllDependencies().contains(dep.getArtifact())) { subList.add(dep); diff --git a/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java b/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java index d6031b35..0ff3b55c 100644 --- a/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java +++ b/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java @@ -60,7 +60,7 @@ public class ProjectInfoReportUtilsTest extends AbstractMojoTestCase { protected void setUp() throws Exception { super.setUp(); - final List servers = new ArrayList(); + final List servers = new ArrayList<>(); org.apache.maven.settings.Server server = new org.apache.maven.settings.Server(); server.setId("localhost"); server.setUsername("admin");