From 025fd2962e81afc55487a44fa96e2240bb3fd5a3 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 26 Jul 2018 23:40:32 +0200 Subject: [PATCH] Polishing --- .../springframework/context/annotation/AdviceMode.java | 4 ++-- .../context/annotation/AdviceModeImportSelector.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AdviceMode.java b/spring-context/src/main/java/org/springframework/context/annotation/AdviceMode.java index e4c44c79e0..5f088533fb 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AdviceMode.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AdviceMode.java @@ -17,8 +17,8 @@ package org.springframework.context.annotation; /** - * Enumeration used to determine whether JDK proxy-based or AspectJ weaving-based advice - * should be applied. + * Enumeration used to determine whether JDK proxy-based or + * AspectJ weaving-based advice should be applied. * * @author Chris Beams * @since 3.1 diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java b/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java index e031c1ed8a..4042e17050 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java @@ -70,14 +70,14 @@ public abstract class AdviceModeImportSelector implements AnnotationAttributes attributes = AnnotationConfigUtils.attributesFor(importingClassMetadata, annType); if (attributes == null) { throw new IllegalArgumentException(String.format( - "@%s is not present on importing class '%s' as expected", - annType.getSimpleName(), importingClassMetadata.getClassName())); + "@%s is not present on importing class '%s' as expected", + annType.getSimpleName(), importingClassMetadata.getClassName())); } - AdviceMode adviceMode = attributes.getEnum(this.getAdviceModeAttributeName()); + AdviceMode adviceMode = attributes.getEnum(getAdviceModeAttributeName()); String[] imports = selectImports(adviceMode); if (imports == null) { - throw new IllegalArgumentException(String.format("Unknown AdviceMode: '%s'", adviceMode)); + throw new IllegalArgumentException("Unknown AdviceMode: " + adviceMode); } return imports; }