hosea commented on code in PR #1311:
URL: https://github.com/apache/wicket/pull/1311#discussion_r2565541903
##########
wicket-spring/src/main/java/org/apache/wicket/spring/injection/annot/AnnotProxyFieldValueFactory.java:
##########
@@ -230,14 +232,14 @@ private String getBeanNameOfClass(final
ApplicationContext ctx, final Class<?> c
Arrays.asList(BeanFactoryUtils.beanNamesForTypeIncludingAncestors(ctx,
resolvableType)));
// filter out beans that are not candidates for autowiring
- if (ctx instanceof AbstractApplicationContext)
+ if (ctx instanceof AbstractApplicationContext
abstractApplicationContext)
{
- Iterator<String> it = names.iterator();
+ final Iterator<String> it = names.iterator();
while (it.hasNext())
{
final String possibility = it.next();
- BeanDefinition beanDef = getBeanDefinition(
-
((AbstractApplicationContext)ctx).getBeanFactory(), possibility);
+ final ConfigurableListableBeanFactory
beanFactory = abstractApplicationContext.getBeanFactory();
+ final BeanDefinition beanDef =
getBeanDefinition(beanFactory, possibility);
Review Comment:
Replaced Cast with variable defined in instanceof above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]