Skip to content

Commit 57ea2a0

Browse files
committed
Merge pull request #362 from komamitsu/minor_improve_pr_361
Minor improvement of pull request 361
2 parents 567f2a6 + 0ad29a2 commit 57ea2a0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

msgpack-jackson/src/main/java/org/msgpack/jackson/dataformat/MessagePackSerializerFactory.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,20 @@
2424
public class MessagePackSerializerFactory
2525
extends BeanSerializerFactory
2626
{
27+
/**
28+
* Constructor for creating instances without configuration.
29+
*/
30+
public MessagePackSerializerFactory()
31+
{
32+
super(null);
33+
}
34+
2735
/**
2836
* Constructor for creating instances with specified configuration.
2937
*
3038
* @param config
3139
*/
32-
protected MessagePackSerializerFactory(SerializerFactoryConfig config)
40+
public MessagePackSerializerFactory(SerializerFactoryConfig config)
3341
{
3442
super(config);
3543
}

msgpack-jackson/src/test/java/org/msgpack/jackson/dataformat/MessagePackGeneratorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ public void testNonStringKey()
655655

656656
ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
657657
if (mapHolder instanceof NonStringKeyMapHolderWithoutAnnotation) {
658-
objectMapper.setSerializerFactory(new MessagePackSerializerFactory(null));
658+
objectMapper.setSerializerFactory(new MessagePackSerializerFactory());
659659
}
660660

661661
byte[] bytes = objectMapper.writeValueAsBytes(mapHolder);

0 commit comments

Comments
 (0)