Skip to content

Commit

Permalink
Merge pull request JodaOrg#343 from emopers/baos_339
Browse files Browse the repository at this point in the history
Fixing DataOutputStream usage
  • Loading branch information
jodastephen committed Jan 28, 2016
2 parents 125389c + 60be421 commit e7e6d78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,9 @@ public void writeTo(String zoneID, OutputStream out) throws IOException {
if (out instanceof DataOutput) {
writeTo(zoneID, (DataOutput)out);
} else {
writeTo(zoneID, (DataOutput)new DataOutputStream(out));
DataOutputStream dout = new DataOutputStream(out);
writeTo(zoneID, (DataOutput)dout);
dout.flush();
}
}

Expand Down

0 comments on commit e7e6d78

Please sign in to comment.