Merge change 6045 into donut

* changes:
  Remove the null-termination for Java string compatibility.