Skip to content

Fix PMD UselessParentheses warnings #93

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,51 +67,51 @@
}

public List<ProbeType> getExcludedProbes() {
return excludedProbes;
}

public void setExcludedProbes(List<ProbeType> excludedProbes) {
this.excludedProbes = excludedProbes;
}

public ScannerDetail getScanDetail() {
return scanDetail;
}

public void setScanDetail(ScannerDetail scanDetail) {
this.scanDetail = scanDetail;
}

public ScannerDetail getPostAnalysisDetail() {
return postAnalysisDetail;
}

public void setPostAnalysisDetail(ScannerDetail postAnalysisDetail) {
this.postAnalysisDetail = postAnalysisDetail;
}

public ScannerDetail getReportDetail() {
return reportDetail;
}

public void setReportDetail(ScannerDetail reportDetail) {
this.reportDetail = reportDetail;
}

public boolean isNoColor() {
return noColor;
}

public void setNoColor(boolean noColor) {
this.noColor = noColor;
}

public List<ProbeType> getProbes() {
return probes;
}

public void setProbes(List<ProbeType> probes) {
this.probes = probes;

Check warning on line 114 in src/main/java/de/rub/nds/scanner/core/config/ExecutorConfig.java

View check run for this annotation

Jenkins CI - TLS-Attacker / JaCoCo Coverage

Not covered lines

Lines 70-114 are not covered by tests
}

public void setProbes(ProbeType... probes) {
Expand Down Expand Up @@ -169,6 +169,6 @@
}

public boolean isMultithreaded() {
return (parallelProbes > 1 || overallThreads > 1);
return parallelProbes > 1 || overallThreads > 1;
}
}
12 changes: 6 additions & 6 deletions src/main/java/de/rub/nds/scanner/core/report/ReportPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ protected StringBuilder prettyAppendUnderlined(
return builder.append(addIndentations(name))
.append(": ")
.append(
(printColorful
printColorful
? AnsiColor.UNDERLINE.getCode() + value + AnsiColor.RESET.getCode()
: value))
: value)
.append("\n");
}

Expand All @@ -157,19 +157,19 @@ protected StringBuilder prettyAppendUnderlined(
return builder.append(addIndentations(name))
.append(": ")
.append(
(printColorful
printColorful
? AnsiColor.UNDERLINE.getCode() + value + AnsiColor.RESET.getCode()
: value))
: value)
.append("\n");
}

protected StringBuilder prettyAppendUnderlined(StringBuilder builder, String name, long value) {
return builder.append(addIndentations(name))
.append(": ")
.append(
(!printColorful
!printColorful
? AnsiColor.UNDERLINE.getCode() + value + AnsiColor.RESET.getCode()
: value))
: value)
.append("\n");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Integer getScoreCap() {
}

public boolean hasScoreCap() {
return (scoreCap != null && scoreCap != 0);
return scoreCap != null && scoreCap != 0;
}

public void setResult(TestResult result) {
Expand Down Expand Up @@ -117,7 +117,7 @@ public void setReferencedPropertyResult(TestResult referencedPropertyResult) {

@JsonIgnore
public boolean isBadInfluence() {
return (influence != null && influence < 0 || scoreCap != null);
return influence != null && influence < 0 || scoreCap != null;
}

@Override
Expand Down
Loading