In class GetInstancesFromServiceLoader, thrown ServiceConfigurationErrors are not logged:
{code:java} try { instances.add( iterator.next() ); } catch (ServiceConfigurationError e) { // ignore, because it can happen when multiple // services are present and some of them are not class loader // compatible with our API. } {code}
There are cases where it would be useful if these were logged after all. Take for example the case where a developer adding a new ConstraintValidator has made a mistake and has not provided a no-args constructor for the validator. ServiceLoader will in this case fail to load the ConstraintValidator, but this will not be obvious to the developer. |
|