Consistent use of AnnotationUtils.rethrowAnnotationConfigurationException()
Closes gh-24379
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -116,9 +116,7 @@ final class AnnotationTypeMappings {
|
||||
queue.addLast(new AnnotationTypeMapping(source, annotationType, ann));
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (ex instanceof AnnotationConfigurationException) {
|
||||
throw (AnnotationConfigurationException) ex;
|
||||
}
|
||||
AnnotationUtils.rethrowAnnotationConfigurationException(ex);
|
||||
if (failureLogger.isEnabled()) {
|
||||
failureLogger.log("Failed to introspect meta-annotation " + annotationType.getName(),
|
||||
(source != null ? source.getAnnotationType() : null), ex);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -1076,7 +1076,7 @@ public abstract class AnnotationUtils {
|
||||
* <p>Otherwise, this method does nothing.
|
||||
* @param ex the throwable to inspect
|
||||
*/
|
||||
private static void rethrowAnnotationConfigurationException(Throwable ex) {
|
||||
static void rethrowAnnotationConfigurationException(Throwable ex) {
|
||||
if (ex instanceof AnnotationConfigurationException) {
|
||||
throw (AnnotationConfigurationException) ex;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -672,9 +672,7 @@ final class TypeMappedAnnotation<A extends Annotation> extends AbstractMergedAnn
|
||||
valueExtractor, aggregateIndex);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (ex instanceof AnnotationConfigurationException) {
|
||||
throw (AnnotationConfigurationException) ex;
|
||||
}
|
||||
AnnotationUtils.rethrowAnnotationConfigurationException(ex);
|
||||
if (logger.isEnabled()) {
|
||||
String type = mapping.getAnnotationType().getName();
|
||||
String item = (mapping.getDistance() == 0 ? "annotation " + type :
|
||||
|
||||
Reference in New Issue
Block a user