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

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

     [ https://issues.apache.org/jira/browse/WICKET-6893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Tzvetanov Grigorov updated WICKET-6893:
----------------------------------------------
    Description: 
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 way most of the ApplicationContextMock methods which currently throw UnsupportedOperationException could be implemented.

  was:
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.


> 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
>             Fix For: 10.0.0
>
>
> 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 way most of the ApplicationContextMock methods which currently throw UnsupportedOperationException could be implemented.



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