Title: [waffle-scm] [884] sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/monitor: exception not needed

Diff

Deleted: sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerNotFoundException.java (883 => 884)

--- sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerNotFoundException.java	2009-01-15 20:08:31 UTC (rev 883)
+++ sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/context/ContextContainerNotFoundException.java	2009-01-15 20:20:06 UTC (rev 884)
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) terms as published in http://waffle.codehaus.org/license.html
- */
-package org.codehaus.waffle.context;
-
-import org.codehaus.waffle.WaffleException;
-
-/**
- * Thrown when context controller is not found in request
- * 
- * @author Mauro Talevi
- */
-...@suppresswarnings("serial")
-public class ContextContainerNotFoundException extends WaffleException {
- 
-    public ContextContainerNotFoundException(String message) {
-        super(message);
-    }
- 
-}

Modified: sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/controller/ContextControllerDefinitionFactory.java (883 => 884)

--- sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/controller/ContextControllerDefinitionFactory.java	2009-01-15 20:08:31 UTC (rev 883)
+++ sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/controller/ContextControllerDefinitionFactory.java	2009-01-15 20:20:06 UTC (rev 884)
@@ -11,7 +11,6 @@
 import org.codehaus.waffle.action.MethodDefinition;
 import org.codehaus.waffle.action.MethodDefinitionFinder;
 import org.codehaus.waffle.action.MissingActionMethodException;
-import org.codehaus.waffle.context.ContextContainerNotFoundException;
 import org.codehaus.waffle.i18n.MessageResources;
 import org.codehaus.waffle.i18n.MessagesContext;
 import org.codehaus.waffle.monitor.ControllerMonitor;
@@ -64,14 +63,6 @@
 
     protected Object findController(String name, HttpServletRequest request, MutablePicoContainer requestLevelContainer) {
 
-        if (requestLevelContainer == null) {
-            controllerMonitor.requestContextContainerNotFound();
-            String message = messageResources
-                    .getMessageWithDefault("requestContextContainerNotFound",
-                            "Waffle context container not found at request level.  WaffleRequestFilter must be registered in the web.xml");
-            throw new ContextContainerNotFoundException(message);
-        }
-
         Object controller = requestLevelContainer.getComponent(name);
         if (controller == null) {
             controllerMonitor.controllerNotFound(name);

Modified: sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/monitor/ControllerMonitor.java (883 => 884)

--- sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/monitor/ControllerMonitor.java	2009-01-15 20:08:31 UTC (rev 883)
+++ sandbox/v2experiment/waffle-core/src/main/java/org/codehaus/waffle/monitor/ControllerMonitor.java	2009-01-15 20:20:06 UTC (rev 884)
@@ -17,6 +17,4 @@
 
     void methodDefinitionNotFound(String controllerName);
 
-    void requestContextContainerNotFound();
-
 }

Modified: sandbox/v2experiment/waffle-core/src/test/java/org/codehaus/waffle/controller/ContextControllerDefinitionFactoryTest.java (883 => 884)

--- sandbox/v2experiment/waffle-core/src/test/java/org/codehaus/waffle/controller/ContextControllerDefinitionFactoryTest.java	2009-01-15 20:08:31 UTC (rev 883)
+++ sandbox/v2experiment/waffle-core/src/test/java/org/codehaus/waffle/controller/ContextControllerDefinitionFactoryTest.java	2009-01-15 20:20:06 UTC (rev 884)
@@ -101,16 +101,4 @@
         ControllerDefinition definition = controllerDefinitionFactory.getControllerDefinition(request, response, context, pico);
     }
 
-    @Test(expected = WaffleException.class)
-    public void cannotGetControllerDefinitionWithMissingRequestLevelContainer() {
-
-        // Mock HttpServletRequest
-        final HttpServletRequest request = mockery.mock(HttpServletRequest.class);
-
-        ContextControllerDefinitionFactory controllerDefinitionFactory = new ContextControllerDefinitionFactory(null,
-                null, new SilentMonitor(), new DefaultMessageResources());
-
-        controllerDefinitionFactory.findController("foobar", request, null);
-    }
-
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to