Skip to content

Commit bd4c64a

Browse files
committed
Turned ByteBufferConverter's visibility to package level
1 parent 3fad0fa commit bd4c64a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-core/src/main/java/org/springframework/core/convert/support/ByteBufferConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
* any type that the {@link ConversionService} support via {@code byte[]}.
3131
*
3232
* @author Phillip Webb
33+
* @since 4.0
3334
*/
34-
public class ByteBufferConverter implements ConditionalGenericConverter {
35+
final class ByteBufferConverter implements ConditionalGenericConverter {
3536

3637
private static final TypeDescriptor BYTE_BUFFER_TYPE = TypeDescriptor.valueOf(ByteBuffer.class);
3738

spring-websocket/src/test/java/org/springframework/web/socket/adapter/ConvertingEncoderDecoderSupportTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.springframework.web.socket.adapter;
1818

1919
import java.nio.ByteBuffer;
20-
2120
import javax.websocket.DecodeException;
2221
import javax.websocket.Decoder;
2322
import javax.websocket.EncodeException;
@@ -28,13 +27,14 @@
2827
import org.junit.Rule;
2928
import org.junit.Test;
3029
import org.junit.rules.ExpectedException;
30+
3131
import org.springframework.beans.factory.annotation.Autowired;
3232
import org.springframework.context.annotation.Bean;
3333
import org.springframework.context.annotation.Configuration;
3434
import org.springframework.core.convert.ConversionService;
3535
import org.springframework.core.convert.ConverterNotFoundException;
3636
import org.springframework.core.convert.converter.Converter;
37-
import org.springframework.core.convert.support.ByteBufferConverter;
37+
import org.springframework.core.convert.support.DefaultConversionService;
3838
import org.springframework.core.convert.support.GenericConversionService;
3939
import org.springframework.web.context.WebApplicationContext;
4040
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
@@ -188,8 +188,7 @@ public static class Config {
188188

189189
@Bean
190190
public ConversionService webSocketConversionService() {
191-
GenericConversionService conversionService = new GenericConversionService();
192-
conversionService.addConverter(new ByteBufferConverter(conversionService));
191+
GenericConversionService conversionService = new DefaultConversionService();
193192
conversionService.addConverter(new MyTypeToStringConverter());
194193
conversionService.addConverter(new MyTypeToBytesConverter());
195194
conversionService.addConverter(new StringToMyTypeConverter());

0 commit comments

Comments
 (0)