Skip to content

Commit

Permalink
InstanceConfiguration readResolve method fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Artmorse committed Feb 6, 2024
1 parent 84d7e02 commit aa25c76
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public class InstanceConfiguration implements Describable<InstanceConfiguration>
private NetworkInterfaceIpStackMode networkInterfaceIpStackMode;

@Deprecated
private boolean externalAddress;
private Boolean externalAddress;

private boolean useInternalAddress;
private boolean ignoreProxy;
Expand Down Expand Up @@ -353,7 +353,10 @@ public ComputeEngineInstance provision() throws IOException {
/** Initializes transient properties */
protected Object readResolve() {
labelSet = Label.parse(labels);
this.networkInterfaceIpStackMode = new NetworkInterfaceSingleStack(externalAddress);
if (externalAddress != null) {
this.networkInterfaceIpStackMode = new NetworkInterfaceSingleStack(externalAddress);
this.externalAddress = null;
}
return this;
}

Expand Down

0 comments on commit aa25c76

Please sign in to comment.