if (!valid) {
if (Settings.enable_nested_map_and_list()) {
if (!(value instanceof Map || value instanceof List)) {
throw new OpenwireException("Only objectified primitive objects, String, Map and List types are allowed but was: " + value + " type: " + value.getClass());
}
} else {
throw new OpenwireException("Only objectified primitive objects and String types are allowed but was: " + value + " type: " + value.getClass());
}
}
}