You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Christian Grobmeier <gr...@gmail.com> on 2011/08/08 17:37:31 UTC

Wrong extension dropping in DefaultActionMapper?

Hello,

while testing Maurizios upgrade to the Junit4 plugin, I tried to test
a method with this url:
this.executeAction("/json/deleteProject");

According to: http://bit.ly/or2TvJ

Well, no the DefaultActionMapper returns null when I use this url
(dropExtension()).
But just because there is no extension, there is no reason to return
null, is it? If there is no extension, the original should be
returned, in my opinion.
Anyway, not sure on this. Here is my patch, can you look over it?

If I am wrong testing must happen with that line:
this.executeAction("/json/deleteProject.action");

Cheers
Christian

Index: src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
===================================================================
--- src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java	(revision
1154872)
+++ src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java	(working
copy)
@@ -477,7 +477,7 @@
                 }
             }
         }
-        return null;
+        return name;
     }

     /**

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org