From 1a7ec7daf29e15a45c9bf5382ca4c080c53b5af8 Mon Sep 17 00:00:00 2001 From: Christian Dupuis Date: Wed, 27 May 2009 15:53:35 +0000 Subject: [PATCH] use the annotation meta data in problem reporting --- .../context/annotation/ConfigurationClass.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java index c6b7f53065..ccd0d601c9 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java @@ -144,7 +144,7 @@ final class ConfigurationClass { public FinalConfigurationProblem() { super(String.format("@Configuration class '%s' may not be final. Remove the final modifier to continue.", - getSimpleName()), new Location(getResource(), ConfigurationClass.this)); + getSimpleName()), new Location(getResource(), getMetadata())); } } @@ -155,7 +155,7 @@ final class ConfigurationClass { public OverloadedMethodProblem(String methodName, int count) { super(String.format("@Configuration class '%s' has %s overloaded factory methods of name '%s'. " + "Only one factory method of the same name allowed.", - getSimpleName(), count, methodName), new Location(getResource(), ConfigurationClass.this)); + getSimpleName(), count, methodName), new Location(getResource(), getMetadata())); } }