Skip to content

Commit b391406

Browse files
committed
remove default factory setter
1 parent 5cbd2e0 commit b391406

2 files changed

Lines changed: 16 additions & 21 deletions

File tree

msgpack-core/src/main/java/org/msgpack/core/MessagePack.java

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,14 @@ public class MessagePack
2828
{
2929
public static final Charset UTF8 = Charset.forName("UTF-8");
3030

31-
private static MessagePackFactory defaultFactory = new MessagePackFactory();
32-
33-
/**
34-
* Sets the default configuration used for the static constructor methods of this MessagePack class.
35-
*/
36-
public static void setDefaultFactory(MessagePackFactory newDefaultFactory)
37-
{
38-
defaultFactory = newDefaultFactory;
39-
}
40-
41-
public static MessagePackFactory getDefaultFactory()
42-
{
43-
return defaultFactory;
44-
}
31+
private final static MessagePackFactory defaultFactory = new MessagePackFactory();
4532

4633
private MessagePack()
4734
{
4835
}
4936

5037
/**
51-
* Equivalent to getDefaultFactory().newPacker(out).
38+
* Equivalent to defaultFactory().newPacker(out).
5239
*
5340
* @param out
5441
* @return
@@ -59,7 +46,7 @@ public static MessagePacker newDefaultPacker(OutputStream out)
5946
}
6047

6148
/**
62-
* Equivalent to getDefaultFactory().newPacker(channel).
49+
* Equivalent to defaultFactory().newPacker(channel).
6350
*
6451
* @param channel
6552
* @return
@@ -70,7 +57,7 @@ public static MessagePacker newDefaultPacker(WritableByteChannel channel)
7057
}
7158

7259
/**
73-
* Equivalent to getDefaultFactory().newBufferPacker()
60+
* Equivalent to defaultFactory().newBufferPacker()
7461
*
7562
* @return
7663
*/
@@ -80,7 +67,7 @@ public static MessageBufferPacker newDefaultBufferPacker()
8067
}
8168

8269
/**
83-
* Equivalent to getDefaultFactory().newUnpacker(in).
70+
* Equivalent to defaultFactory().newUnpacker(in).
8471
*
8572
* @param in
8673
* @return
@@ -91,7 +78,7 @@ public static MessageUnpacker newDefaultUnpacker(InputStream in)
9178
}
9279

9380
/**
94-
* Equivalent to getDefaultFactory().newUnpacker(channel).
81+
* Equivalent to defaultFactory().newUnpacker(channel).
9582
*
9683
* @param channel
9784
* @return
@@ -102,7 +89,7 @@ public static MessageUnpacker newDefaultUnpacker(ReadableByteChannel channel)
10289
}
10390

10491
/**
105-
* Equivalent to getDefaultFactory().newUnpacker(contents).
92+
* Equivalent to defaultFactory().newUnpacker(contents).
10693
*
10794
* @param contents
10895
* @return
@@ -113,7 +100,7 @@ public static MessageUnpacker newDefaultUnpacker(byte[] contents)
113100
}
114101

115102
/**
116-
* Equivalent to getDefaultFactory().newUnpacker(contents, offset, length).
103+
* Equivalent to defaultFactory().newUnpacker(contents, offset, length).
117104
*
118105
* @param contents
119106
* @param offset
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.msgpack.core;
2+
3+
/**
4+
*
5+
*/
6+
public class MesssagePackerConfig
7+
{
8+
}

0 commit comments

Comments
 (0)