Properly detect null value params in params conditions

Issue: SPR-15831
This commit is contained in:
Rossen Stoyanchev
2017-08-01 12:52:28 +02:00
parent ca0983cd85
commit 4fc0ce1206
3 changed files with 22 additions and 3 deletions

View File

@@ -51,6 +51,12 @@ public class ParamsRequestConditionTests {
assertNotNull(condition.getMatchingCondition(get("/path?foo=").toExchange()));
}
@Test // SPR-15831
public void paramPresentNullValue() throws Exception {
ParamsRequestCondition condition = new ParamsRequestCondition("foo");
assertNotNull(condition.getMatchingCondition(get("/path?foo").toExchange()));
}
@Test
public void paramPresentNoMatch() throws Exception {
ParamsRequestCondition condition = new ParamsRequestCondition("foo");