Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
mawinter69 committed Oct 17, 2023
1 parent 43569ea commit 6055faa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public DiskSpace markNodeOfflineIfDiskspaceIsTooLow(Computer c) {
long threshold = getThresholdBytes(c);
if (size != null) {
size.setThreshold(threshold);
size.setWarningThreshold(getWarningThresholdBytes(c));
long warningThreshold = getWarningThresholdBytes(c);
size.setWarningThreshold(warningThreshold);
if (size.size < threshold) {

Check warning on line 120 in core/src/main/java/hudson/node_monitors/AbstractDiskSpaceMonitor.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 120 is only partially covered, one branch is missing
size.setTriggered(this.getClass(), true);
if (getDescriptor().markOffline(c, size)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public boolean isTriggered() {

@Restricted(NoExternalUse.class)
public boolean isWarning() {
return warningThreshold > 0 && size < warningThreshold;
return size > threshold && size < warningThreshold ;

Check warning on line 127 in core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 127 is only partially covered, one branch is missing

Check warning on line 127 in core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java

View check run for this annotation

ci.jenkins.io / Java Compiler

frontend:yarn

ERROR: ';' is preceded with whitespace. [NoWhitespaceBefore]

Check warning on line 127 in core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java

View check run for this annotation

ci.jenkins.io / Java Compiler

spotbugs:spotbugs

ERROR: ';' is preceded with whitespace. [NoWhitespaceBefore]

Check warning on line 127 in core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java

View check run for this annotation

ci.jenkins.io / Java Compiler

compiler:compile

ERROR: ';' is preceded with whitespace. [NoWhitespaceBefore]

Check warning on line 127 in core/src/main/java/hudson/node_monitors/DiskSpaceMonitorDescriptor.java

View check run for this annotation

ci.jenkins.io / CheckStyle

NoWhitespaceBeforeCheck

ERROR: ';' is preceded with whitespace.
Raw output
<p>Since Checkstyle 3.0</p><p> Checks that there is no whitespace before a token. More specifically, it checks that it is not preceded with whitespace, or (if linebreaks are allowed) all characters on the line before are whitespace. To allow linebreaks before a token, set property <code>allowLineBreaks</code> to <code>true</code>. No check occurs before semi-colons in empty for loop initializers or conditions. </p>
}

/**
Expand Down

0 comments on commit 6055faa

Please sign in to comment.