for (Object o : world.getRealms()) {
ClassRealm dep = (ClassRealm) o;
if (!StringUtils.equals(dep.getId(), realm.getId())) {
try {
for (String packageName : packages) {
dep.importFrom(realm.getId(), packageName);
}
} catch (NoSuchRealmException e) {
// should never happen
throw new SonarException(e);
}