if (value instanceof ExternalResourceLocator) {
value = ((ExternalResourceLocator) value).getResource();
}
// Sanity checks
if (value == null && era.mandatory()) {
throw new ResourceInitializationException(new IllegalStateException("Mandatory resource ["
+ key + "] is not set on [" + baseCls + "]"));
}
// Now record the setting and optionally apply it to the given