Skip to content

Commit

Permalink
Override getRetentionStrategy() in BeforeHourWrapsPolicy
Browse files Browse the repository at this point in the history
For some reason, value maintained by hudson.model.Slave is null under
cirsumstances described in #56, which is causing return value to be
set to RetentionStrategy.Always.INSTANCE.

Closes #56

Signed-off-by: Richard Kosegi <richard.kosegi@gmail.com>
  • Loading branch information
rkosegi committed Oct 30, 2022
1 parent 88fd94c commit 0ebfb4e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public BeforeHourWrapsPolicy() {
super(STRATEGY_SINGLETON);
}

@SuppressWarnings("rawtypes")
@Override
public RetentionStrategy<AbstractCloudComputer> getRetentionStrategy() {
return STRATEGY_SINGLETON;
}

@SuppressWarnings("rawtypes")
private static class RetentionStrategyImpl extends RetentionStrategy<AbstractCloudComputer> {
Expand Down

0 comments on commit 0ebfb4e

Please sign in to comment.