Browse Source

Polishing

pull/707/head
Juergen Hoeller 11 years ago
parent
commit
bb1d1e916e
  1. 2
      spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java
  2. 4
      spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java
  3. 7
      spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java

2
spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java

@ -254,7 +254,7 @@ public abstract class YamlProcessor { @@ -254,7 +254,7 @@ public abstract class YamlProcessor {
* contain the same values as the {@link MatchCallback} Properties.
* @param source the source map
* @return a flattened map
* @since 4.2.3
* @since 4.1.3
*/
protected final Map<String, Object> getFlattenedMap(Map<String, Object> source) {
Map<String, Object> result = new LinkedHashMap<String, Object>();

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

@ -235,10 +235,10 @@ class ConfigurationClassEnhancer { @@ -235,10 +235,10 @@ class ConfigurationClassEnhancer {
@Override
public boolean isMatch(Method candidateMethod) {
return candidateMethod.getName().equals("setBeanFactory") &&
return (candidateMethod.getName().equals("setBeanFactory") &&
candidateMethod.getParameterTypes().length == 1 &&
candidateMethod.getParameterTypes()[0].equals(BeanFactory.class) &&
BeanFactoryAware.class.isAssignableFrom(candidateMethod.getDeclaringClass());
BeanFactoryAware.class.isAssignableFrom(candidateMethod.getDeclaringClass()));
}
}

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

@ -1,5 +1,5 @@ @@ -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 { @@ -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()));
}
}

Loading…
Cancel
Save