AutowiredAnnotationBeanPostProcessor.java (spring-framework-5.3.23) | : | AutowiredAnnotationBeanPostProcessor.java (spring-framework-5.3.24) | ||
---|---|---|---|---|
/* | /* | |||
* Copyright 2002-2021 the original author or authors. | * Copyright 2002-2022 the original author or authors. | |||
* | * | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | * You may obtain a copy of the License at | |||
* | * | |||
* https://www.apache.org/licenses/LICENSE-2.0 | * https://www.apache.org/licenses/LICENSE-2.0 | |||
* | * | |||
* Unless required by applicable law or agreed to in writing, software | * Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
skipping to change at line 562 | skipping to change at line 562 | |||
protected boolean determineRequiredStatus(AnnotationAttributes ann) { | protected boolean determineRequiredStatus(AnnotationAttributes ann) { | |||
return (!ann.containsKey(this.requiredParameterName) || | return (!ann.containsKey(this.requiredParameterName) || | |||
this.requiredParameterValue == ann.getBoolean(thi s.requiredParameterName)); | this.requiredParameterValue == ann.getBoolean(thi s.requiredParameterName)); | |||
} | } | |||
/** | /** | |||
* Obtain all beans of the given type as autowire candidates. | * Obtain all beans of the given type as autowire candidates. | |||
* @param type the type of the bean | * @param type the type of the bean | |||
* @return the target beans, or an empty Collection if no bean of this ty pe is found | * @return the target beans, or an empty Collection if no bean of this ty pe is found | |||
* @throws BeansException if bean retrieval failed | * @throws BeansException if bean retrieval failed | |||
* @deprecated since 5.3.24 since it is unused in the meantime | ||||
*/ | */ | |||
@Deprecated | ||||
protected <T> Map<String, T> findAutowireCandidates(Class<T> type) throws BeansException { | protected <T> Map<String, T> findAutowireCandidates(Class<T> type) throws BeansException { | |||
if (this.beanFactory == null) { | if (this.beanFactory == null) { | |||
throw new IllegalStateException("No BeanFactory configure d - " + | throw new IllegalStateException("No BeanFactory configure d - " + | |||
"override the getBeanOfType method or spe cify the 'beanFactory' property"); | "override the getBeanOfType method or spe cify the 'beanFactory' property"); | |||
} | } | |||
return BeanFactoryUtils.beansOfTypeIncludingAncestors(this.beanFa ctory, type); | return BeanFactoryUtils.beansOfTypeIncludingAncestors(this.beanFa ctory, type); | |||
} | } | |||
/** | /** | |||
* Register the specified bean as dependent on the autowired beans. | * Register the specified bean as dependent on the autowired beans. | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added |