From 0741e6470f15eddd2a6517fa88cb5c42718979a8 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Wed, 29 May 2019 02:19:23 +0900 Subject: [PATCH] Use MediaType.APPLICATION_CBOR constant See https://github.com/spring-projects/spring-framework/pull/23042 Closes gh-16986 --- .../rsocket/RSocketStrategiesAutoConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketStrategiesAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketStrategiesAutoConfiguration.java index 0246baf433..c2a0033f91 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketStrategiesAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/rsocket/RSocketStrategiesAutoConfiguration.java @@ -83,7 +83,7 @@ public class RSocketStrategiesAutoConfiguration { return (strategy) -> { ObjectMapper objectMapper = builder.factory(new CBORFactory()).build(); MediaType[] supportedTypes = new MediaType[] { - new MediaType("application", "cbor") }; + MediaType.APPLICATION_CBOR }; strategy.decoder(new Jackson2CborDecoder(objectMapper, supportedTypes)); strategy.encoder(new Jackson2CborEncoder(objectMapper, supportedTypes)); };