- Revision
- 842
- Author
- mauro
- Date
- 2008-09-15 12:46:57 -0500 (Mon, 15 Sep 2008)
Log Message
Removed checking for nulls in the constructor, as the dependency is handled by the container and would result in an unsatisfied dependency exception.
Modified Paths
Diff
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/action/DefaultActionMethodResponseHandler.java (841 => 842)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/action/DefaultActionMethodResponseHandler.java 2008-09-15 17:43:18 UTC (rev 841) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/action/DefaultActionMethodResponseHandler.java 2008-09-15 17:46:57 UTC (rev 842) @@ -29,13 +29,6 @@ private final ActionMonitor actionMonitor; public DefaultActionMethodResponseHandler(ViewDispatcher viewDispatcher, ActionMonitor actionMonitor) { - if (viewDispatcher == null) { - throw new IllegalArgumentException("ViewDispatcher cannot be null"); - } - if (actionMonitor == null) { - throw new IllegalArgumentException("ActionMonitor cannot be null"); - } - this.viewDispatcher = viewDispatcher; this.actionMonitor = actionMonitor; }
Modified: trunk/waffle-core/src/test/java/org/codehaus/waffle/action/DefaultActionMethodResponseHandlerTest.java (841 => 842)
--- trunk/waffle-core/src/test/java/org/codehaus/waffle/action/DefaultActionMethodResponseHandlerTest.java 2008-09-15 17:43:18 UTC (rev 841) +++ trunk/waffle-core/src/test/java/org/codehaus/waffle/action/DefaultActionMethodResponseHandlerTest.java 2008-09-15 17:46:57 UTC (rev 842) @@ -10,14 +10,11 @@ import javax.servlet.http.HttpServletResponse; import org.codehaus.waffle.monitor.ActionMonitor; -import org.codehaus.waffle.testmodel.StubMonitor; -import org.codehaus.waffle.testmodel.StubViewDispatcher; import org.codehaus.waffle.view.View; import org.codehaus.waffle.view.ViewDispatcher; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.integration.junit4.JMock; -import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; @@ -26,28 +23,6 @@ private final Mockery mockery = new Mockery(); @Test - public void cannotAcceptNullsInConstructor() { - try { - new DefaultActionMethodResponseHandler(null, null); - Assert.fail("IllegalArgumentException expected, null is not a valid argument"); - } catch (IllegalArgumentException expected) { - // expected - } - try { - new DefaultActionMethodResponseHandler(null, new StubMonitor()); - Assert.fail("IllegalArgumentException expected, null is not a valid argument"); - } catch (IllegalArgumentException expected) { - // expected - } - try { - new DefaultActionMethodResponseHandler(new StubViewDispatcher(), null); - Assert.fail("IllegalArgumentException expected, null is not a valid argument"); - } catch (IllegalArgumentException expected) { - // expected - } - } - - @Test public void canAvoidProcessingResponseValueWhenResponseHasBeenCommitted() throws Exception { final HttpServletResponse response = mockery.mock(HttpServletResponse.class); mockery.checking(new Expectations() {{
To unsubscribe from this list please visit:
