mirror of https://github.com/apache/jclouds.git
.indexOf() -> .contains()
This commit is contained in:
parent
e885fabcad
commit
be1847ce9b
|
@ -1,4 +1,4 @@
|
||||||
/**
|
/*
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* contributor license agreements. See the NOTICE file
|
* contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
* distributed with this work for additional information
|
||||||
|
@ -45,7 +45,7 @@ public class AddIDEControllerIfNotExists implements Function<IMachine, Void> {
|
||||||
machine.addStorageController(controllerName, StorageBus.IDE);
|
machine.addStorageController(controllerName, StorageBus.IDE);
|
||||||
machine.saveSettings();
|
machine.saveSettings();
|
||||||
} catch (VBoxException e) {
|
} catch (VBoxException e) {
|
||||||
if (e.getMessage().indexOf("already exists") == -1)
|
if (!e.getMessage().contains("already exists"))
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue