From cf45d901d4c8b53ae61e03ac622692debc6ae267 Mon Sep 17 00:00:00 2001 From: choihyunjin Date: Fri, 17 Jan 2020 01:51:41 +0900 Subject: [PATCH] Separate catch code --- .../core/annotation/TypeMappedAnnotation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java b/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java index b2939c59dcdc..13400a41566e 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/TypeMappedAnnotation.java @@ -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. @@ -671,10 +671,10 @@ private static TypeMappedAnnotation createIfPossible( return new TypeMappedAnnotation<>(mapping, null, source, rootAttribute, valueExtractor, aggregateIndex); } + catch (AnnotationConfigurationException ex) { + throw ex; + } catch (Exception ex) { - if (ex instanceof AnnotationConfigurationException) { - throw (AnnotationConfigurationException) ex; - } if (logger.isEnabled()) { String type = mapping.getAnnotationType().getName(); String item = (mapping.getDistance() == 0 ? "annotation " + type :