Object result = digester.parse(input);
if (result == null && !(result instanceof Profiles)) {
throw new ConfigReadException("No profiles found in config file");
}
Profiles profiles = (Profiles) result;
List list = profiles.getProfiles();
if (list.size() == 0) {
throw new ConfigReadException("No profile in config file of kind: "
+ Profiles.PROFILE_KIND);
}