Permalink
Browse files

Document versions involved in instanceId backward compatibility code.

Also, make instanceId private (since it can no longer be final), as allowing
it to be modified from outside of EC2Slave itself would cause serious problems.
  • Loading branch information...
kpfleming committed Mar 5, 2013
1 parent 44a9f29 commit fede71f0be5bb0bf459bbb07c2be22b029a48784
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/hudson/plugins/ec2/EC2Slave.java
@@ -61,7 +61,7 @@
* @author Kohsuke Kawaguchi
*/
public final class EC2Slave extends Slave {
- public String instanceId;
+ private String instanceId;
/**
* Comes from {@link SlaveTemplate#initScript}.
*/
@@ -126,9 +126,9 @@ public EC2Slave(String instanceId, String description, String remoteFS, int sshP
protected Object readResolve() {
/*
* If instanceId is null, this object was deserialized from an old
- * version of the plugin, where this field did not exist. In those
- * versions, the node name *was* the instance ID, so we can get it
- * from there.
+ * version of the plugin, where this field did not exist (prior to
+ * version 1.18). In those versions, the node name *was* the instance
+ * ID, so we can get it from there.
*/
if (instanceId == null) {
instanceId = getNodeName();

0 comments on commit fede71f

Please sign in to comment.