.indexOf() -> .contains()

This commit is contained in:
Mattias Holmqvist 2011-11-30 08:18:59 +01:00
parent e885fabcad
commit be1847ce9b
1 changed files with 2 additions and 2 deletions

View File

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