Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6893

Make ApplicationContextMock smarter by delegating to DefaultListableBeanFactory

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 10.0.0
    • 10.0.0
    • wicket-spring
    • None

    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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mgrigorov Martin Tzvetanov Grigorov
            mgrigorov Martin Tzvetanov Grigorov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment