Revert "Prevent NPE in Mojarra when creating initial view"
This reverts commit d31900e5f9.
The fix for SWF-1571 reported against Mojarra 2.1.8 seems to be
problematic when Web Flow's ResponseStateManager is not used as
reported in SWF-1630.
Testing with Mojarra 2.1.20 I can no longer reproduce SWF-1571
and originally it was suspected to be a Mojarra issue. Hence
this revert.
Issue: SWF-1571, SWF-1630
This commit is contained in:
@@ -72,15 +72,12 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
|
||||
private final MockHttpServletResponse response = new MockHttpServletResponse();
|
||||
|
||||
private LocalAttributeMap<Object> viewScope = new LocalAttributeMap<Object>();
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
configureJsf();
|
||||
this.extContext.setNativeContext(this.servletContext);
|
||||
this.extContext.setNativeRequest(this.request);
|
||||
this.extContext.setNativeResponse(this.response);
|
||||
RequestContextHolder.setRequestContext(this.context);
|
||||
EasyMock.expect(this.context.getViewScope()).andStubReturn(this.viewScope);
|
||||
EasyMock.expect(this.context.getFlashScope()).andStubReturn(this.flashMap);
|
||||
EasyMock.expect(this.context.getExternalContext()).andStubReturn(this.extContext);
|
||||
EasyMock.expect(this.context.getRequestParameters()).andStubReturn(
|
||||
@@ -151,7 +148,6 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
EasyMock.expectLastCall().andReturn(true);
|
||||
|
||||
EasyMock.replay(new Object[] { this.context });
|
||||
setupViewState();
|
||||
|
||||
View restoredView = this.factory.getView(this.context);
|
||||
|
||||
@@ -198,7 +194,6 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
EasyMock.expectLastCall().andReturn(true);
|
||||
|
||||
EasyMock.replay(new Object[] { this.context });
|
||||
setupViewState();
|
||||
|
||||
View restoredView = this.factory.getView(this.context);
|
||||
|
||||
@@ -234,7 +229,6 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
EasyMock.expectLastCall().andReturn(true);
|
||||
|
||||
EasyMock.replay(new Object[] { this.context });
|
||||
setupViewState();
|
||||
|
||||
View restoredView = this.factory.getView(this.context);
|
||||
|
||||
@@ -285,7 +279,6 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
|
||||
this.context.inViewState();
|
||||
EasyMock.expectLastCall().andReturn(true);
|
||||
setupViewState();
|
||||
|
||||
EasyMock.replay(new Object[] { this.context });
|
||||
this.factory.getView(this.context);
|
||||
@@ -296,10 +289,6 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
.getExceptionQueuedEventContext().getException());
|
||||
}
|
||||
|
||||
private void setupViewState() {
|
||||
this.viewScope.put(FlowResponseStateManager.FACES_VIEW_STATE, "X");
|
||||
}
|
||||
|
||||
private class NoExecutionLifecycle extends FlowLifecycle {
|
||||
|
||||
public NoExecutionLifecycle(Lifecycle delegate) {
|
||||
|
||||
Reference in New Issue
Block a user