Got a List<String>
iterated as follow:
void validateValue() throws ValidationException {
aList.forEach(k -> validateValue(k));
}
void validateValue (String s) throws ValidationException {
..
}
But the compiler says:
Unhandled exception type ValidationException
Seems the exception has to be handled in the forEach
clause.
Is that normal or is there a turn around (beside Java 7 style iteration below that pass)?
void validateValue() throws ValidationException {
for(String k : aList) {
validateValue(k);
}
}