Added check for expanding already encoded UriComponents object

This commit is contained in:
Arjen Poutsma
2011-11-02 11:49:45 +00:00
parent 8337f4bf20
commit e8dd35ce5e
2 changed files with 7 additions and 0 deletions

View File

@@ -54,4 +54,9 @@ public class UriComponentsTests {
assertEquals("http://example.com/1 2 3 4", uriComponents.toUriString());
}
@Test(expected = IllegalStateException.class)
public void expandEncoded() {
UriComponentsBuilder.fromPath("/{foo}").build().encode().expand("bar");
}
}