SPR-8059 fix issue with != param condition

This commit is contained in:
Rossen Stoyanchev
2011-06-02 12:29:26 +00:00
parent 7be1b5c3f5
commit ce78a519f6
2 changed files with 34 additions and 2 deletions

View File

@@ -75,8 +75,12 @@ abstract class ServletAnnotationMappingUtils {
boolean negated = separator > 0 && param.charAt(separator - 1) == '!';
String key = !negated ? param.substring(0, separator) : param.substring(0, separator - 1);
String value = param.substring(separator + 1);
if (!value.equals(request.getParameter(key))) {
return negated;
boolean match = value.equals(request.getParameter(key));
if (negated) {
match = !match;
}
if (!match) {
return false;
}
}
}