private boolean foundInXml(String problemId, ValidationProblemAttribute... attributes) { if (attributes != null && "UNDEFINED_REFERENCED_BEAN".equals(problemId)) { for (ValidationProblemAttribute attribute : attributes) { if ("BEAN".equals(attribute.getKey())) { String beanName = (String) attribute.getValue(); return BeansEditorUtils.getFirstReferenceableNodeById(document, beanName, file) != null; } } } return false; }