Remove deprecated MediaType entries
See gh-33809
This commit is contained in:
@@ -201,7 +201,6 @@ class ReactiveTypeHandler {
|
||||
* @return the concrete streaming {@code MediaType} if one could be found or {@code null}
|
||||
* if none could be found
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nullable
|
||||
static MediaType findConcreteJsonStreamMediaType(Collection<MediaType> acceptedMediaTypes) {
|
||||
for (MediaType acceptedType : acceptedMediaTypes) {
|
||||
@@ -220,9 +219,6 @@ class ReactiveTypeHandler {
|
||||
else if (MediaType.APPLICATION_NDJSON.includes(acceptedType)) {
|
||||
return MediaType.APPLICATION_NDJSON;
|
||||
}
|
||||
else if (MediaType.APPLICATION_STREAM_JSON.includes(acceptedType)) {
|
||||
return MediaType.APPLICATION_STREAM_JSON;
|
||||
}
|
||||
}
|
||||
return null; // not a concrete streaming type
|
||||
}
|
||||
|
||||
@@ -158,19 +158,6 @@ class ReactiveTypeHandlerTests {
|
||||
.isEqualTo(MediaType.APPLICATION_NDJSON);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
void findsConcreteStreamingMediaType_plainStreamingJsonFirst() {
|
||||
final List<MediaType> accept = List.of(
|
||||
MediaType.ALL,
|
||||
MediaType.APPLICATION_STREAM_JSON,
|
||||
MediaType.parseMediaType("application/*+x-ndjson"),
|
||||
MediaType.parseMediaType("application/vnd.myapp.v1+x-ndjson"));
|
||||
|
||||
assertThat(ReactiveTypeHandler.findConcreteJsonStreamMediaType(accept))
|
||||
.isEqualTo(MediaType.APPLICATION_STREAM_JSON);
|
||||
}
|
||||
|
||||
@Test
|
||||
void deferredResultSubscriberWithOneValue() throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user