This commit is contained in:
Muga Nishizawa
2011-04-06 01:18:12 +09:00
3 changed files with 177 additions and 1 deletions
@@ -30,7 +30,11 @@ public class BigDecimalTemplate implements Template {
@Override
public void pack(Packer pk, Object target) throws IOException {
BigDecimal temp = (BigDecimal) target;
pk.packString(temp.toString());
try {
pk.packString(temp.toString());
} catch (NullPointerException e) {
throw new MessageTypeException("target is null.", e);
}
}
@Override