stephan     2003/05/06 02:47:23

  Modified:    src/java/org/apache/cocoon/acting AbstractMultiAction.java
  Log:
  Fixing issue with a double remove of a prefix.
  
  Revision  Changes    Path
  1.4       +6 -9      
cocoon-2.1/src/java/org/apache/cocoon/acting/AbstractMultiAction.java
  
  Index: AbstractMultiAction.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/acting/AbstractMultiAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbstractMultiAction.java  1 May 2003 14:48:47 -0000       1.3
  +++ AbstractMultiAction.java  6 May 2003 09:47:23 -0000       1.4
  @@ -100,7 +100,7 @@
                   String methodName = methods[i].getName();
                   if (methodName.startsWith(ACTION_METHOD_PREFIX)) {
                       String actionName = removePrefix(methodName);
  -                    methodIndex.put(methodName, methods[i]);
  +                    methodIndex.put(actionName, methods[i]);
                       if (getLogger().isDebugEnabled()) {
                           getLogger().debug("registered method \"" + 
methodName + "\" as action \"" + actionName + "\"");
                       }
  @@ -119,17 +119,14 @@
               Request req = ObjectModelHelper.getRequest(objectModel);
               if (req != null) {
                   // checking request for action method parameters
  -                String actionName;
  +                String name;
                   for (Enumeration e = req.getParameterNames(); 
e.hasMoreElements();) {
  -                    String name = (String) e.nextElement();
  +                    name = (String) e.nextElement();
                       if (name.startsWith(ACTION_METHOD_PREFIX)) {
                           if (name.endsWith(".x") || name.endsWith(".y")) {
  -                            actionName = 
name.substring(ACTION_METHOD_PREFIX.length(), name.length() - 2);
  +                            name = 
name.substring(ACTION_METHOD_PREFIX.length(), name.length() - 2);
                           }
  -                        else {
  -                            actionName = 
name.substring(ACTION_METHOD_PREFIX.length());
  -                        }
  -                        actionMethod = removePrefix(actionName);
  +                        actionMethod = removePrefix(name);
                           break;
                       }
                   }
  
  
  

Reply via email to