Closed aurbroszniowski closed 9 years ago
Different ways to fix this problem are:
For Example:
Proposed change:
public interface ServiceConfiguration<T extends Service> {
/**
* Indicates which service this configuration works with.
*
* @return the service type
*/
Class<T> getServiceType();
void validate(List<ServiceConfiguration> serviceConfigurations) throws ValidationException;
}
approach 2, will lead to unavoidable use of concrete types of ServiceConfiguration in validation hence defaulting to approach#1 for implementation.
Take the following code:
Here the Default CacheLoaderWriter Configuration is missing, which is a problem since we need to define a CacheLoaderWriter when enabling writebehind.
An exception is correctly thrown during the cachemanager creation, however, the exception is a NPE, while it could be a more explicit one, to tell that the config is missing the CacheLoaderWriter definition.