mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
Merge remote-tracking branch 'origin/master' into merge-master-to-7xx-2024-01-20
# Conflicts: # Jenkinsfile # core/src/main/java/org/apache/struts2/dispatcher/MockDispatcher.java # core/src/main/java/org/apache/struts2/util/StrutsTestCaseHelper.java # core/src/test/java/org/apache/struts2/dispatcher/DispatcherTest.java # plugins/dwr/src/main/java/org/apache/struts2/validators/DWRValidator.java # plugins/portlet/src/main/java/org/apache/struts2/portlet/PortletApplicationMap.java # plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java # plugins/portlet/src/test/java/org/apache/struts2/StrutsTestCasePortletTests.java # plugins/sitemesh/src/main/java/org/apache/struts2/sitemesh/OldDecorator2NewStrutsDecorator.java
This commit is contained in:
@@ -203,9 +203,9 @@ public abstract class StrutsJUnit4TestCase<T> extends XWorkJUnit4TestCase {
|
||||
* Sets up the configuration settings, XWork configuration, and
|
||||
* message resources
|
||||
*/
|
||||
@Override
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initServletMockObjects();
|
||||
setupBeforeInitDispatcher();
|
||||
initDispatcherParams();
|
||||
@@ -239,14 +239,10 @@ public abstract class StrutsJUnit4TestCase<T> extends XWorkJUnit4TestCase {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
if (dispatcher != null && dispatcher.getConfigurationManager() != null) {
|
||||
dispatcher.cleanup();
|
||||
dispatcher = null;
|
||||
}
|
||||
StrutsTestCaseHelper.tearDown();
|
||||
StrutsTestCaseHelper.tearDown(dispatcher);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -169,8 +169,8 @@ public abstract class StrutsTestCase extends XWorkTestCase {
|
||||
* Sets up the configuration settings, XWork configuration, and
|
||||
* message resources
|
||||
*/
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
initServletMockObjects();
|
||||
setupBeforeInitDispatcher();
|
||||
dispatcher = initDispatcher(dispatcherInitParams);
|
||||
@@ -200,14 +200,9 @@ public abstract class StrutsTestCase extends XWorkTestCase {
|
||||
return du;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
// maybe someone else already destroyed Dispatcher
|
||||
if (dispatcher != null && dispatcher.getConfigurationManager() != null) {
|
||||
dispatcher.cleanup();
|
||||
dispatcher = null;
|
||||
}
|
||||
StrutsTestCaseHelper.tearDown();
|
||||
StrutsTestCaseHelper.tearDown(dispatcher);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user