Skip to content

Commit

Permalink
Always use default method if wildcard patter returned null or empty
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Oct 30, 2015
1 parent 0a08f6b commit 146b44e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.util.PatternMatcher;
import com.opensymphony.xwork2.util.WildcardHelper;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
Expand Down Expand Up @@ -77,7 +77,12 @@ public ActionConfigMatcher(PatternMatcher<?> patternMatcher,
Map<String, String> vars) {

String methodName = convertParam(orig.getMethodName(), vars);
if (methodName != null && !orig.isAllowedMethod(methodName)) {

if (StringUtils.isEmpty(methodName)) {
methodName = ActionConfig.DEFAULT_METHOD;
}

if (!orig.isAllowedMethod(methodName)) {
return null;
}

Expand Down

0 comments on commit 146b44e

Please sign in to comment.