void findAndStartBundle(ModuleDefinition currentDefinition) {
Assert.notNull(currentDefinition, "moduleDefinition cannot be null");
//install if not present
final ModuleLoader moduleLoader = moduleLoaderRegistry.getModuleLoader(ModuleRuntimeUtils.getModuleLoaderKey(currentDefinition));
final Resource[] bundleLocations = moduleLoader.getClassLocations(currentDefinition);
//find bundle with name
Bundle bundle = findBundle(currentDefinition);
if (bundleLocations == null || bundleLocations.length == 0) {
throw new InvalidStateException("Module loader '" + moduleLoader.getClass().getName()
+ "' returned " + (bundleLocations != null ? "empty": "null") +
" bundle class locations. Cannot install bundle for module '"
+ currentDefinition.getName() + "'");
}