- Revision
- 466
- Author
- mward
- Date
- 2007-12-11 17:43:36 -0600 (Tue, 11 Dec 2007)
Log Message
refactored out use of "break;" from method
Modified Paths
Diff
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java (465 => 466)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java 2007-12-11 23:41:50 UTC (rev 465) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java 2007-12-11 23:43:36 UTC (rev 466) @@ -95,19 +95,15 @@ return methodDefinition; } - MethodDefinition methodDefinition = null; for (Method method : controllerType.getMethods()) { if (method.isAnnotationPresent(DefaultActionMethod.class)) { defaultMethodCache.put(controllerType, method); // add to cache - methodDefinition = buildDefaultMethodDefinition(method, request); - break; + MethodDefinition methodDefinition = buildDefaultMethodDefinition(method, request); + actionMonitor.defaultActionMethodFound(methodDefinition); + return methodDefinition; } } - if (methodDefinition != null) { - actionMonitor.defaultActionMethodFound(methodDefinition); - return methodDefinition; - } throw new NoDefaultActionMethodException(controllerType.getName()); }
To unsubscribe from this list please visit:
