XMLErrorHandler currErrorHandler = fErrorReporter.getErrorHandler();
// Setting a parser property can be much more expensive
// than checking its value. Don't set the ERROR_HANDLER
// or LOCALE properties unless they've actually changed.
if (currErrorHandler != fSchemaParser.getProperty(ERROR_HANDLER)) {
fSchemaParser.setProperty(ERROR_HANDLER, (currErrorHandler != null) ? currErrorHandler : new DefaultErrorHandler());
if (fAnnotationValidator != null) {
fAnnotationValidator.setProperty(ERROR_HANDLER, (currErrorHandler != null) ? currErrorHandler : new DefaultErrorHandler());
}
}
Locale currentLocale = fErrorReporter.getLocale();
if (currentLocale != fSchemaParser.getProperty(LOCALE)) {
fSchemaParser.setProperty(LOCALE, currentLocale);