Skip to content

Commit

Permalink
use primitive types
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanSpieker committed Oct 15, 2023
1 parent aaaa329 commit a36db0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
public class BuildIdRunSelectorExtension implements InternalRunSelectorExtensionPoint {
@Override
public Run select(Job project, String build, Run run) {
Integer buildNr = 1;
Boolean buildIdIsInteger = true;
int buildNr = 1;
boolean buildIdIsInteger = true;
try {
buildNr = Integer.parseInt(build);
} catch (NumberFormatException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ private Run findSpecific(Job job, Run run, String what, String specific) {
}

if (run != null) {
Boolean doBreak = specific == null;
boolean doBreak = specific == null;
if (!doBreak) {
Result result = run.getResult();
if (result != null) {
Boolean isCompleted = result.isCompleteBuild();
Boolean isSuccessful = result == Result.SUCCESS;
Boolean isFailed = result == Result.FAILURE;
Boolean isUnstable = result == Result.UNSTABLE;
Boolean isUnsuccessful = !isSuccessful;
Boolean isStable = isSuccessful;
boolean isCompleted = result.isCompleteBuild();
boolean isSuccessful = result == Result.SUCCESS;
boolean isFailed = result == Result.FAILURE;
boolean isUnstable = result == Result.UNSTABLE;
boolean isUnsuccessful = !isSuccessful;
boolean isStable = isSuccessful;

doBreak = (specific.equals("Completed") && isCompleted)
|| (specific.equals("Successful") && isCompleted && isSuccessful)
Expand Down

0 comments on commit a36db0d

Please sign in to comment.