Skip to content

Commit

Permalink
Remove unnecessary toString calls
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Dec 17, 2024
1 parent c7971a8 commit 997553b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/ec2/EC2HostAddressProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static String mac(Instance instance, ConnectionStrategy strategy) {
case PRIVATE_IP:
return getPrivateIpAddress(instance);
default:
throw new IllegalArgumentException("Could not mac host address for strategy = " + strategy.toString());
throw new IllegalArgumentException("Could not mac host address for strategy = " + strategy);
}
}

Expand All @@ -43,7 +43,7 @@ public static String windows(Instance instance, ConnectionStrategy strategy) {
} else if (strategy.equals(PUBLIC_DNS) || strategy.equals(PUBLIC_IP)) {
return getPublicIpAddress(instance);
} else {
throw new IllegalArgumentException("Could not windows host address for strategy = " + strategy.toString());
throw new IllegalArgumentException("Could not windows host address for strategy = " + strategy);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/ec2/EC2RetentionStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private long internalCheck(EC2Computer computer) {
&& (InstanceState.STOPPED.equals(state) || InstanceState.STOPPING.equals(state))) {
if (computer.isOnline()) {
LOGGER.info("External Stop of " + computer.getName() + " detected - disconnecting. instance status"
+ state.toString());
+ state);
computer.disconnect(null);
}
return CHECK_INTERVAL_MINUTES;
Expand Down

0 comments on commit 997553b

Please sign in to comment.