Skip to content

Commit

Permalink
[MNG-7416] Simplify Boolean expressions and returns (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne authored Sep 26, 2023
1 parent abd0e76 commit c16ec94
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ private void printDependencyListing(DependencyNode node) {

if (!node.getChildren().isEmpty()) {
boolean toBeIncluded = false;
List<DependencyNode> subList = new ArrayList<DependencyNode>();
List<DependencyNode> subList = new ArrayList<>();
for (DependencyNode dep : node.getChildren()) {
if (dependencies.getAllDependencies().contains(dep.getArtifact())) {
subList.add(dep);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class ProjectInfoReportUtilsTest extends AbstractMojoTestCase {
protected void setUp() throws Exception {
super.setUp();

final List<org.apache.maven.settings.Server> servers = new ArrayList<org.apache.maven.settings.Server>();
final List<org.apache.maven.settings.Server> servers = new ArrayList<>();
org.apache.maven.settings.Server server = new org.apache.maven.settings.Server();
server.setId("localhost");
server.setUsername("admin");
Expand Down

0 comments on commit c16ec94

Please sign in to comment.