Skip to content

Commit 328ba7b

Browse files
committed
Polishing
1 parent d97add0 commit 328ba7b

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -140,7 +140,7 @@ protected String buildDefaultBeanName(BeanDefinition definition, BeanDefinitionR
140140
* <p>The default implementation simply builds a decapitalized version
141141
* of the short class name: e.g. "mypackage.MyJdbcDao" -> "myJdbcDao".
142142
* <p>Note that inner classes will thus have names of the form
143-
* "outerClassName.innerClassName", which because of the period in the
143+
* "outerClassName.InnerClassName", which because of the period in the
144144
* name may be an issue if you are autowiring by name.
145145
* @param definition the bean definition to build a bean name for
146146
* @return the default bean name (never {@code null})

spring-context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static void processCommonDefinitionAnnotations(AnnotatedBeanDefinition abd, Anno
287287
if (metadata.isAnnotated(Lazy.class.getName())) {
288288
abd.setLazyInit(attributesFor(metadata, Lazy.class).getBoolean("value"));
289289
}
290-
else if (abd.getMetadata().isAnnotated(Lazy.class.getName())) {
290+
else if (abd.getMetadata() != metadata && abd.getMetadata().isAnnotated(Lazy.class.getName())) {
291291
abd.setLazyInit(attributesFor(abd.getMetadata(), Lazy.class).getBoolean("value"));
292292
}
293293

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,8 @@ private static class BeanMethodInterceptor implements MethodInterceptor, Conditi
256256
/**
257257
* Enhance a {@link Bean @Bean} method to check the supplied BeanFactory for the
258258
* existence of this bean object.
259-
* @throws Throwable as a catch-all for any exception that may be thrown when
260-
* invoking the super implementation of the proxied method i.e., the actual
261-
* {@code @Bean} method.
259+
* @throws Throwable as a catch-all for any exception that may be thrown when invoking the
260+
* super implementation of the proxied method i.e., the actual {@code @Bean} method
262261
*/
263262
@Override
264263
public Object intercept(Object enhancedConfigInstance, Method beanMethod, Object[] beanMethodArgs,

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) {
232232
int registryId = System.identityHashCode(registry);
233233
if (this.registriesPostProcessed.contains(registryId)) {
234234
throw new IllegalStateException(
235-
"postProcessBeanDefinitionRegistry already called for this post-processor against " + registry);
235+
"postProcessBeanDefinitionRegistry already called on this post-processor against " + registry);
236236
}
237237
if (this.factoriesPostProcessed.contains(registryId)) {
238238
throw new IllegalStateException(
239-
"postProcessBeanFactory already called for this post-processor against " + registry);
239+
"postProcessBeanFactory already called on this post-processor against " + registry);
240240
}
241241
this.registriesPostProcessed.add(registryId);
242242

@@ -252,7 +252,7 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
252252
int factoryId = System.identityHashCode(beanFactory);
253253
if (this.factoriesPostProcessed.contains(factoryId)) {
254254
throw new IllegalStateException(
255-
"postProcessBeanFactory already called for this post-processor against " + beanFactory);
255+
"postProcessBeanFactory already called on this post-processor against " + beanFactory);
256256
}
257257
this.factoriesPostProcessed.add(factoryId);
258258
if (!this.registriesPostProcessed.contains(factoryId)) {

spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -211,9 +211,8 @@ public static boolean isVisibilityBridgeMethodPair(Method bridgeMethod, Method b
211211
if (bridgeMethod == bridgedMethod) {
212212
return true;
213213
}
214-
return Arrays.equals(bridgeMethod.getParameterTypes(), bridgedMethod.getParameterTypes()) &&
215-
bridgeMethod.getReturnType().equals(bridgedMethod.getReturnType());
214+
return (Arrays.equals(bridgeMethod.getParameterTypes(), bridgedMethod.getParameterTypes()) &&
215+
bridgeMethod.getReturnType().equals(bridgedMethod.getReturnType()));
216216
}
217217

218-
219218
}

0 commit comments

Comments
 (0)