Description
In ./gora-core/src/test/java/org/apache/gora/util/TestWritableUtils.java
ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutput out = new DataOutputStream(bos); WritableUtils.writeProperties(out, props); DataInput in = new DataInputStream(new ByteArrayInputStream(bos.toByteArray()));
When a DataOutputStream instance wraps an underlying ByteArrayOutputStream instance,
it is recommended to flush or close the DataOutputStream before invoking the underlying instances's toByteArray(). Also, it is a good practice to call flush/close explicitly as mentioned for example at http://stackoverflow.com/questions/2984538/how-to-use-bytearrayoutputstream-and-dataoutputstream-simultaneously-java.
The patch adds a flush method before calling toByteArray().