Merge changes I2159bf13,I93146faa

* changes:
  Fix error handling in StatsEvent
  Handle nulls in Java autogeneration