Avi-Levi / kryo

Automatically exported from code.google.com/p/kryo
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

BigDecimalSerializer not supporting null values #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.create BigDecimalSerializer
2.set AcceptsNull(true)
3.throw in a null value

What is the expected output? What do you see instead?
return value of null

What version of the Kryo are you using?
2.0.8

Please provide any additional information below.
Source indicates you missed the following on the write method:
if (object == null) {
  output.writeByte(NULL);
  return;
}

It seems the receive side handling of the null value is also missing.

Original issue reported on code.google.com by michael....@gmail.com on 23 May 2012 at 7:19

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r251.

Original comment by nathan.s...@gmail.com on 23 May 2012 at 8:55

GoogleCodeExporter commented 9 years ago
Fixed in SVN, thanks. Note this was a feature request, as you shouldn't call 
setAcceptsNull(true) on a serializer that doesn't support it (unless you plan 
to never pass it null).

Original comment by nathan.s...@gmail.com on 23 May 2012 at 8:56