mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
Merge branch 'master' of git@github.com:msgpack/msgpack
This commit is contained in:
commit
29e99e229b
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.msgpack</groupId>
|
||||
<artifactId>msgpack</artifactId>
|
||||
<version>0.3</version>
|
||||
<version>0.4</version>
|
||||
<description>MessagePack for Java</description>
|
||||
|
||||
<name>MessagePack for Java</name>
|
||||
|
@ -23,6 +23,10 @@ import java.util.Map;
|
||||
import java.math.BigInteger;
|
||||
|
||||
public abstract class MessagePackObject implements Cloneable, MessagePackable {
|
||||
static {
|
||||
Templates.load();
|
||||
}
|
||||
|
||||
public boolean isNil() {
|
||||
return false;
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ package org.msgpack;
|
||||
import org.msgpack.template.*;
|
||||
|
||||
public class Templates {
|
||||
public static void load() { }
|
||||
|
||||
public static Template tList(Template elementTemplate) {
|
||||
return new ListTemplate(elementTemplate);
|
||||
}
|
||||
|
@ -108,6 +108,9 @@ import org.msgpack.annotation.MessagePackOrdinalEnum;
|
||||
* </pre>
|
||||
*/
|
||||
public class Unpacker implements Iterable<MessagePackObject> {
|
||||
static {
|
||||
Templates.load();
|
||||
}
|
||||
|
||||
// buffer:
|
||||
// +---------------------------------------------+
|
||||
|
@ -18,8 +18,6 @@ public class TestReflectionPackerTemplate {
|
||||
|
||||
@Test
|
||||
public void testPackConvert() throws Exception {
|
||||
tString(); // FIXME link StringTemplate
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
MessagePacker packer = ReflectionPacker.create(StringFieldClass.class);
|
||||
@ -45,8 +43,6 @@ public class TestReflectionPackerTemplate {
|
||||
|
||||
@Test
|
||||
public void testPackConvert02() throws Exception {
|
||||
tString(); // FIXME link StringTemplate
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
CustomPacker.register(StringFieldClass.class, ReflectionPacker.create(StringFieldClass.class));
|
||||
|
Loading…
x
Reference in New Issue
Block a user