if (diagnostics != null && !diagnostics.isEmpty()) {
Object model = proxy.getModelObject();
if (model != null && model instanceof VariantBuilder) {
VariantBuilder variant = (VariantBuilder) model;
VariantType type = variant.getVariantType();
if (type == VariantType.LAYOUT) {
InternalLayoutContentBuilder content =
(InternalLayoutContentBuilder)
variant.getContentBuilder();
if (content != null) {
Layout layout = content.getLayout();
if (layout != null) {
key = layout.getType().toString();
}
}
} else {
key = type.toString();
}
}
Image cachedImage = null;
if((cachedImage = registry.get("ERROR_IMAGE_" + key)) != null) {