Repository: logging-log4j2 Updated Branches: refs/heads/master 863e61d83 -> d5e9a2473
Reuse Apache Commons IO code for tests. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/d5e9a247 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/d5e9a247 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/d5e9a247 Branch: refs/heads/master Commit: d5e9a24730986508219d76b2b6d851b6543a7fde Parents: 863e61d Author: Gary Gregory <[email protected]> Authored: Sat Jun 13 15:08:29 2015 -0700 Committer: Gary Gregory <[email protected]> Committed: Sat Jun 13 15:08:29 2015 -0700 ---------------------------------------------------------------------- .../test/java/org/apache/log4j/util/SerializationTestHelper.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/d5e9a247/log4j-1.2-api/src/test/java/org/apache/log4j/util/SerializationTestHelper.java ---------------------------------------------------------------------- diff --git a/log4j-1.2-api/src/test/java/org/apache/log4j/util/SerializationTestHelper.java b/log4j-1.2-api/src/test/java/org/apache/log4j/util/SerializationTestHelper.java index 4cbb53e..06ea6b4 100644 --- a/log4j-1.2-api/src/test/java/org/apache/log4j/util/SerializationTestHelper.java +++ b/log4j-1.2-api/src/test/java/org/apache/log4j/util/SerializationTestHelper.java @@ -140,9 +140,7 @@ public class SerializationTestHelper { // // if the file doesn't exist then // assume that we are setting up and need to write it - final FileOutputStream os = new FileOutputStream(witnessFile); - os.write(actual); - os.close(); + FileUtils.writeByteArrayToFile(witnessFile, actual); fail("Writing witness file " + witness); } }
