You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/06/07 09:24:00 UTC

[jira] [Commented] (WICKET-6893) Make ApplicationContextMock smarter by delegating to DefaultListableBeanFactory

    [ https://issues.apache.org/jira/browse/WICKET-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17358468#comment-17358468 ] 

ASF subversion and git services commented on WICKET-6893:
---------------------------------------------------------

Commit b66ab275684a792908fd6ba60a2af0dc6fe0fae9 in wicket's branch refs/heads/master from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=wicket.git;h=b66ab27 ]

WICKET-6893 Use DefaultListableBeanFactory as a delegate in ApplicationContextMock

This way ApplicationContextMock could provide implementation for more of its methods and more importantly SpringBeanLocator#getBeanDefinition() [1] could work with it, also two more places in org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory will use it

1. https://github.com/apache/wicket/blob/8d44c5b5094cccc9d5e05408e42ccc1bd0dd4da6/wicket-spring/src/main/java/org/apache/wicket/spring/SpringBeanLocator.java#L421

(cherry picked from commit 7957ade4d41bc76709151da498a1e504b2f4a3c3)


> Make ApplicationContextMock smarter by delegating to DefaultListableBeanFactory
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-6893
>                 URL: https://issues.apache.org/jira/browse/WICKET-6893
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-spring
>    Affects Versions: 10.0.0
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>
> There are several checks in Wicket-Spring integration code that checks whether the ApplicationContext is a sub-type of AbstractApplicationContext.
> Depending on your usage of ApplicationContextMock it may lead to ClassCastException at SpringBeanLocator#getBeanDefinition().
> Until now ApplicationContextMock did not extend from AbstractApplicationContext but it could be easily re-worked by delegating to an instance of DefaultListableBeanFactory that is used as a delegate.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)