This is an automated email from the ASF dual-hosted git repository. jochen pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push: new aeffacde remove some unused variables Eclipse warned about new 29dc5ea0 Merge pull request #531 from elharo/unused2 aeffacde is described below commit aeffacde1f2518aea5648225cbb86670c4e8c293 Author: Elliotte Rusty Harold <elh...@ibiblio.org> AuthorDate: Wed Dec 20 18:28:05 2023 -0500 remove some unused variables Eclipse warned about --- src/test/java/org/apache/commons/io/FileUtilsTest.java | 1 - src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java | 3 +-- src/test/java/org/apache/commons/io/input/TeeReaderTest.java | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/io/FileUtilsTest.java b/src/test/java/org/apache/commons/io/FileUtilsTest.java index 2a67be47..15a31473 100644 --- a/src/test/java/org/apache/commons/io/FileUtilsTest.java +++ b/src/test/java/org/apache/commons/io/FileUtilsTest.java @@ -1914,7 +1914,6 @@ public class FileUtilsTest extends AbstractTempDirTest { iterateFilesAndDirs(subDir1, fileFilterAllFiles, fileFilterAllDirs, expectedFilesAndDirs); // // "*.txt" and "*" - final int filesCount; expectedFilesAndDirs = Arrays.asList(subDir1, subDir2, someFile, subDir3, subDir4); iterateFilesAndDirs(subDir1, fileFilterExtTxt, fileFilterAllDirs, expectedFilesAndDirs); // diff --git a/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java b/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java index b8684781..182d014b 100644 --- a/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java +++ b/src/test/java/org/apache/commons/io/input/AbstractInputStreamTest.java @@ -134,8 +134,7 @@ public abstract class AbstractInputStreamTest { public void testReadPastEOF() throws IOException { final InputStream is = inputStreams[0]; final byte[] buf = new byte[1024]; - int read; - while ((read = is.read(buf, 0, buf.length)) != -1) { + while (is.read(buf, 0, buf.length) != -1) { // empty } diff --git a/src/test/java/org/apache/commons/io/input/TeeReaderTest.java b/src/test/java/org/apache/commons/io/input/TeeReaderTest.java index c4945258..515ea859 100644 --- a/src/test/java/org/apache/commons/io/input/TeeReaderTest.java +++ b/src/test/java/org/apache/commons/io/input/TeeReaderTest.java @@ -66,7 +66,7 @@ public class TeeReaderTest { verify(goodR).close(); final TeeReader closingTr = new TeeReader(goodR, badW, true); - final IOException e = assertThrows(IOException.class, closingTr::close); + assertThrows(IOException.class, closingTr::close); verify(goodR, times(2)).close(); }