ical4j
ical4j copied to clipboard
CalendarValidatorImpl is still validating components even when validiate recursive is false
Describe the bug When validating the icalendar object with recursive set to FALSE (calendar.validate(false)), it's still validating the components.
public void validate(boolean recurse) throws ValidationException {
this.validator.validate(this);
if (recurse) {
this.validateProperties();
this.validateComponents();
}
}
This is caused by the following code inside the CalendarValidatorImpl.java validator:
// perform ITIP validation on components..
if (method != null) {
for (CalendarComponent component : target.getComponents()) {
component.validate(method);
}
}
Expected behavior Don't validate the components of the icalendar object if recursive validation is set to FALSE.
Environment (please complete the following information):
- OS: Linux
- Java Version 8
- ical4j v3.0.11