Skip to content

Commit

Permalink
Modernize code
Browse files Browse the repository at this point in the history
  • Loading branch information
offa committed Nov 8, 2024
1 parent f5f28f7 commit 6505b2e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ public class BlockPipelineQueueDispatcher extends QueueTaskDispatcher {
@CheckForNull
@Override
public CauseOfBlockage canRun(Queue.Item item) {
if (item.task instanceof Job) {
final Job<?, ?> job = (Job<?, ?>) item.task;

if (item.task instanceof Job<?, ?> job) {
if (isBlocked(job)) {
final ProjectBlockedProperty property = getProjectProperty(job);
return new JobBlockedCause(property == null ? null : property.getMessage());
Expand Down

0 comments on commit 6505b2e

Please sign in to comment.