Skip to content

Commit

Permalink
[JENKINS-15820] Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
kei-yamazaki committed Sep 17, 2014
1 parent 363f3ce commit 34820ce
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -14,10 +14,11 @@
* @author Vijay Kiran
*/
public class JCloudsRetentionStrategy extends RetentionStrategy<JCloudsComputer> {
private ReentrantLock checkLock = new ReentrantLock(false);
private transient ReentrantLock checkLock;

@DataBoundConstructor
public JCloudsRetentionStrategy() {
readResolve();
}

@Override
Expand Down Expand Up @@ -65,6 +66,11 @@ public String getDisplayName() {
}
}

protected Object readResolve() {
checkLock = new ReentrantLock(false);
return this;
}

private static final Logger LOGGER = Logger.getLogger(JCloudsRetentionStrategy.class.getName());

public static boolean disabled = Boolean.getBoolean(JCloudsRetentionStrategy.class.getName() + ".disabled");
Expand Down

0 comments on commit 34820ce

Please sign in to comment.