Merge branch 'master' of git@github.com:msgpack/msgpack

This commit is contained in:
Muga Nishizawa 2010-09-27 17:56:19 +09:00
commit 29e99e229b
5 changed files with 10 additions and 5 deletions

View File

@ -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>

View File

@ -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;
}

View File

@ -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);
}

View File

@ -108,6 +108,9 @@ import org.msgpack.annotation.MessagePackOrdinalEnum;
* </pre>
*/
public class Unpacker implements Iterable<MessagePackObject> {
static {
Templates.load();
}
// buffer:
// +---------------------------------------------+

View File

@ -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));