Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-7416] Simplify Boolean expressions and returns #63

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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