From f72ba868d12e4cc3d889e7307596dc1675453d6b Mon Sep 17 00:00:00 2001 From: dota17 Date: Tue, 28 Apr 2020 11:08:16 +0800 Subject: [PATCH] Fixed the checkStyle RedundantModifier: Redundant 'final' modifier. [ERROR] src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java:[264,22] (modifier) RedundantModifier: Redundant 'final' modifier. --- .../collections4/properties/EmptyPropertiesTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java b/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java index bb9c4c4b08..ff690c78be 100644 --- a/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java +++ b/src/test/java/org/apache/commons/collections4/properties/EmptyPropertiesTest.java @@ -250,18 +250,18 @@ public void testReplaceOldValue() { public void testSave() throws IOException { final String comments = "Hello world!"; // actual - try (final ByteArrayOutputStream actual = new ByteArrayOutputStream()) { - try (final PrintStream out = new PrintStream(actual)) { + try (ByteArrayOutputStream actual = new ByteArrayOutputStream()) { + try (PrintStream out = new PrintStream(actual)) { PropertiesFactory.EMPTY_PROPERTIES.save(out, comments); } // expected - try (final ByteArrayOutputStream expected = new ByteArrayOutputStream()) { - try (final PrintStream out = new PrintStream(expected)) { + try (ByteArrayOutputStream expected = new ByteArrayOutputStream()) { + try (PrintStream out = new PrintStream(expected)) { PropertiesFactory.INSTANCE.createProperties().save(out, comments); } Assert.assertArrayEquals(expected.toByteArray(), actual.toByteArray()); expected.reset(); - try (final PrintStream out = new PrintStream(expected)) { + try (PrintStream out = new PrintStream(expected)) { new Properties().save(out, comments); } Assert.assertArrayEquals(expected.toByteArray(), actual.toByteArray());