issue 384: refacoring MachineUtils. Eliminate a refuse from CreateAndRegisterMachineFromIsoIfNotAlreadyExists

This commit is contained in:
andreaturli 2012-01-17 19:46:10 +00:00
parent 6302c283a4
commit 8eb13861fc

View File

@ -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);