java: Fixed a bug that NullPointerException occurs within DefaultTemplate.java

This commit is contained in:
Muga Nishizawa 2011-04-05 01:27:51 +09:00
parent dfe29a0329
commit 337cc9fa78

View File

@ -43,7 +43,7 @@ public class DefaultTemplate implements Template {
public void pack(Packer pk, Object target) throws IOException {
if(messagePackable) {
if(target == null) {
throw new MessageTypeException("target is null: " + target.getClass().getName());
throw new MessageTypeException("target is null.");
}
((MessagePackable)target).messagePack(pk);
return;