mirror of
https://github.com/apache/jclouds.git
synced 2025-02-16 06:56:45 +00:00
issue 384: refacoring MachineUtils. Eliminate a refuse from CreateAndRegisterMachineFromIsoIfNotAlreadyExists
This commit is contained in:
parent
6302c283a4
commit
8eb13861fc
@ -82,8 +82,8 @@ public class CreateAndRegisterMachineFromIsoIfNotAlreadyExists implements Functi
|
||||
final IVirtualBox vBox = manager.get().getVBox();
|
||||
String vmName = launchSpecification.getVmSpec().getVmName();
|
||||
try {
|
||||
return vBox.findMachine(vmName);
|
||||
//throw new IllegalStateException("Machine " + vmName + " is already registered.");
|
||||
vBox.findMachine(vmName);
|
||||
throw new IllegalStateException("Machine " + vmName + " is already registered.");
|
||||
} catch (VBoxException e) {
|
||||
if (machineNotFoundException(e))
|
||||
return createMachine(vBox, launchSpecification);
|
||||
|
Loading…
x
Reference in New Issue
Block a user