Browse Source

SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2906 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Arjen Poutsma 16 years ago
parent
commit
44ef392925
  1. 7
      org.springframework.web/src/test/java/org/springframework/http/MediaTypeTests.java

7
org.springframework.web/src/test/java/org/springframework/http/MediaTypeTests.java

@ -101,11 +101,16 @@ public class MediaTypeTests { @@ -101,11 +101,16 @@ public class MediaTypeTests {
MediaType.parseMediaType("audio/basic)");
}
@Test(expected = IllegalArgumentException.class)
public void parseMediaTypeEmptyParameterAttribute() {
MediaType.parseMediaType("audio/*;=value");
}
@Test(expected = IllegalArgumentException.class)
public void parseMediaTypeEmptyParameterValue() {
MediaType.parseMediaType("audio/*;attr=");
}
@Test(expected = IllegalArgumentException.class)
public void parseMediaTypeIllegalParameterAttribute() {
MediaType.parseMediaType("audio/*;attr<=value");

Loading…
Cancel
Save