mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-31 07:58:20 +02:00
java: Fixed a bug that NullPointerException occurs within DefaultTemplate.java
This commit is contained in:
parent
dfe29a0329
commit
337cc9fa78
@ -43,7 +43,7 @@ public class DefaultTemplate implements Template {
|
|||||||
public void pack(Packer pk, Object target) throws IOException {
|
public void pack(Packer pk, Object target) throws IOException {
|
||||||
if(messagePackable) {
|
if(messagePackable) {
|
||||||
if(target == null) {
|
if(target == null) {
|
||||||
throw new MessageTypeException("target is null: " + target.getClass().getName());
|
throw new MessageTypeException("target is null.");
|
||||||
}
|
}
|
||||||
((MessagePackable)target).messagePack(pk);
|
((MessagePackable)target).messagePack(pk);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user