Browse Source

Revert signature change in BDRU.registerWithGeneratedName

This change broke binary compatibility as evidenced by running
the greenhouse test suite and finding that Spring Integration's
AbstractConsumerEndpointParser.parseInternal fails with
NoSuchMethodError when trying to invoke.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3969 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/merge
Chris Beams 15 years ago
parent
commit
975e44079f
  1. 2
      org.springframework.beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionReaderUtils.java
  2. 9
      org.springframework.context/src/main/java/org/springframework/context/annotation/SimpleComponentRegistrar.java

2
org.springframework.beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionReaderUtils.java

@ -166,7 +166,7 @@ public class BeanDefinitionReaderUtils {
* for the given bean definition or the definition cannot be registered * for the given bean definition or the definition cannot be registered
*/ */
public static String registerWithGeneratedName( public static String registerWithGeneratedName(
BeanDefinition definition, BeanDefinitionRegistry registry) AbstractBeanDefinition definition, BeanDefinitionRegistry registry)
throws BeanDefinitionStoreException { throws BeanDefinitionStoreException {
String generatedName = generateBeanName(definition, registry, false); String generatedName = generateBeanName(definition, registry, false);

9
org.springframework.context/src/main/java/org/springframework/context/annotation/SimpleComponentRegistrar.java

@ -20,9 +20,16 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.BeanComponentDefinition;
import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.parsing.ComponentDefinition;
import org.springframework.beans.factory.parsing.ComponentRegistrar; import org.springframework.beans.factory.parsing.ComponentRegistrar;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
/**
* TODO SPR-7420: document
*
* @author Chris Beams
* @since 3.1
*/
public class SimpleComponentRegistrar implements ComponentRegistrar { public class SimpleComponentRegistrar implements ComponentRegistrar {
private final BeanDefinitionRegistry registry; private final BeanDefinitionRegistry registry;
@ -32,7 +39,7 @@ public class SimpleComponentRegistrar implements ComponentRegistrar {
} }
public String registerWithGeneratedName(BeanDefinition beanDefinition) { public String registerWithGeneratedName(BeanDefinition beanDefinition) {
return BeanDefinitionReaderUtils.registerWithGeneratedName(beanDefinition, this.registry); return BeanDefinitionReaderUtils.registerWithGeneratedName((AbstractBeanDefinition)beanDefinition, this.registry);
} }
public void registerBeanComponent(BeanComponentDefinition component) { public void registerBeanComponent(BeanComponentDefinition component) {

Loading…
Cancel
Save