diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java index 921745cda34..dea7da17b7f 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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. @@ -140,7 +140,7 @@ public class AnnotationBeanNameGenerator implements BeanNameGenerator { *
The default implementation simply builds a decapitalized version * of the short class name: e.g. "mypackage.MyJdbcDao" -> "myJdbcDao". *
Note that inner classes will thus have names of the form - * "outerClassName.innerClassName", which because of the period in the + * "outerClassName.InnerClassName", which because of the period in the * name may be an issue if you are autowiring by name. * @param definition the bean definition to build a bean name for * @return the default bean name (never {@code null}) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java index 89204b634ea..057be1df4c3 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java @@ -287,7 +287,7 @@ public class AnnotationConfigUtils { if (metadata.isAnnotated(Lazy.class.getName())) { abd.setLazyInit(attributesFor(metadata, Lazy.class).getBoolean("value")); } - else if (abd.getMetadata().isAnnotated(Lazy.class.getName())) { + else if (abd.getMetadata() != metadata && abd.getMetadata().isAnnotated(Lazy.class.getName())) { abd.setLazyInit(attributesFor(abd.getMetadata(), Lazy.class).getBoolean("value")); } diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java index 1705fcfcfe2..5fa8380af11 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java @@ -256,9 +256,8 @@ class ConfigurationClassEnhancer { /** * Enhance a {@link Bean @Bean} method to check the supplied BeanFactory for the * existence of this bean object. - * @throws Throwable as a catch-all for any exception that may be thrown when - * invoking the super implementation of the proxied method i.e., the actual - * {@code @Bean} method. + * @throws Throwable as a catch-all for any exception that may be thrown when invoking the + * super implementation of the proxied method i.e., the actual {@code @Bean} method */ @Override public Object intercept(Object enhancedConfigInstance, Method beanMethod, Object[] beanMethodArgs, diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index bb488888317..7e5ac12dd95 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -232,11 +232,11 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo int registryId = System.identityHashCode(registry); if (this.registriesPostProcessed.contains(registryId)) { throw new IllegalStateException( - "postProcessBeanDefinitionRegistry already called for this post-processor against " + registry); + "postProcessBeanDefinitionRegistry already called on this post-processor against " + registry); } if (this.factoriesPostProcessed.contains(registryId)) { throw new IllegalStateException( - "postProcessBeanFactory already called for this post-processor against " + registry); + "postProcessBeanFactory already called on this post-processor against " + registry); } this.registriesPostProcessed.add(registryId); @@ -252,7 +252,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo int factoryId = System.identityHashCode(beanFactory); if (this.factoriesPostProcessed.contains(factoryId)) { throw new IllegalStateException( - "postProcessBeanFactory already called for this post-processor against " + beanFactory); + "postProcessBeanFactory already called on this post-processor against " + beanFactory); } this.factoriesPostProcessed.add(factoryId); if (!this.registriesPostProcessed.contains(factoryId)) { diff --git a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java index 75d1b8a3fec..2f44c305972 100644 --- a/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java +++ b/spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 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. @@ -211,9 +211,8 @@ public abstract class BridgeMethodResolver { if (bridgeMethod == bridgedMethod) { return true; } - return Arrays.equals(bridgeMethod.getParameterTypes(), bridgedMethod.getParameterTypes()) && - bridgeMethod.getReturnType().equals(bridgedMethod.getReturnType()); + return (Arrays.equals(bridgeMethod.getParameterTypes(), bridgedMethod.getParameterTypes()) && + bridgeMethod.getReturnType().equals(bridgedMethod.getReturnType())); } - }