private HandlerProcessingResultImpl getFailureResult(AnnotationInfo element, String message, boolean doLog) { HandlerProcessingResultImpl result = new HandlerProcessingResultImpl(); result.addResult(getAnnotationType(), ResultType.FAILED); if (doLog) { Class c = (Class) element.getAnnotatedElement(); String className = c.getName(); String localString = localStrings.getLocalString( "enterprise.deployment.annotation.handlers.datasourcedefinitionsfailure", "failed to handle annotation [ {0} ] on class [ {1} ] due to the following exception : ", element.getAnnotation(), className); logger.log(Level.WARNING, localString, message); } return result; }