Fix Checkstyle violations.
This commit is contained in:
parent
23bc4e7979
commit
f9f99ccfd6
|
@ -250,18 +250,18 @@ public class EmptyPropertiesTest {
|
||||||
public void testSave() throws IOException {
|
public void testSave() throws IOException {
|
||||||
final String comments = "Hello world!";
|
final String comments = "Hello world!";
|
||||||
// actual
|
// actual
|
||||||
try (final ByteArrayOutputStream actual = new ByteArrayOutputStream()) {
|
try (ByteArrayOutputStream actual = new ByteArrayOutputStream()) {
|
||||||
try (final PrintStream out = new PrintStream(actual)) {
|
try (PrintStream out = new PrintStream(actual)) {
|
||||||
PropertiesFactory.EMPTY_PROPERTIES.save(out, comments);
|
PropertiesFactory.EMPTY_PROPERTIES.save(out, comments);
|
||||||
}
|
}
|
||||||
// expected
|
// expected
|
||||||
try (final ByteArrayOutputStream expected = new ByteArrayOutputStream()) {
|
try (ByteArrayOutputStream expected = new ByteArrayOutputStream()) {
|
||||||
try (final PrintStream out = new PrintStream(expected)) {
|
try (PrintStream out = new PrintStream(expected)) {
|
||||||
PropertiesFactory.INSTANCE.createProperties().save(out, comments);
|
PropertiesFactory.INSTANCE.createProperties().save(out, comments);
|
||||||
}
|
}
|
||||||
Assert.assertArrayEquals(expected.toByteArray(), actual.toByteArray());
|
Assert.assertArrayEquals(expected.toByteArray(), actual.toByteArray());
|
||||||
expected.reset();
|
expected.reset();
|
||||||
try (final PrintStream out = new PrintStream(expected)) {
|
try (PrintStream out = new PrintStream(expected)) {
|
||||||
new Properties().save(out, comments);
|
new Properties().save(out, comments);
|
||||||
}
|
}
|
||||||
Assert.assertArrayEquals(expected.toByteArray(), actual.toByteArray());
|
Assert.assertArrayEquals(expected.toByteArray(), actual.toByteArray());
|
||||||
|
|
Loading…
Reference in New Issue