From commits-return-75505-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Aug 7 23:36:31 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mailroute1-lw-us.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id C2F57180181 for ; Sat, 8 Aug 2020 01:36:31 +0200 (CEST) Received: from mail.apache.org (localhost [127.0.0.1]) by mailroute1-lw-us.apache.org (ASF Mail Server at mailroute1-lw-us.apache.org) with SMTP id 0379A126C3A for ; Fri, 7 Aug 2020 23:36:31 +0000 (UTC) Received: (qmail 54986 invoked by uid 500); 7 Aug 2020 23:36:30 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 54973 invoked by uid 99); 7 Aug 2020 23:36:30 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2020 23:36:30 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 1E3CB8242E; Fri, 7 Aug 2020 23:36:29 +0000 (UTC) Date: Fri, 07 Aug 2020 23:36:29 +0000 To: "commits@commons.apache.org" Subject: [commons-io] branch master updated: Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <159684338987.7214.15812212962213959499@gitbox.apache.org> From: sebb@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: commons-io X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: d97c3bd024be301a91df30c08cd517d64ec2b3fc X-Git-Newrev: ce9deabbb3d5ab247239f88f1e268ad65bba878f X-Git-Rev: ce9deabbb3d5ab247239f88f1e268ad65bba878f X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. sebb 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 ce9deab Fix warnings ce9deab is described below commit ce9deabbb3d5ab247239f88f1e268ad65bba878f Author: Sebb AuthorDate: Sat Aug 8 00:36:21 2020 +0100 Fix warnings --- .../io/output/ByteArrayOutputStreamTestCase.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java b/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java index e9b2aed..eba6e26 100644 --- a/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java +++ b/src/test/java/org/apache/commons/io/output/ByteArrayOutputStreamTestCase.java @@ -104,14 +104,15 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testWriteZero(final String baosName, final BAOSFactory baosFactory) { + public void testWriteZero(final String baosName, final BAOSFactory baosFactory) { final AbstractByteArrayOutputStream baout = baosFactory.instance(); baout.write(new byte[0], 0, 0); + assertTrue(true, "Dummy"); } @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testInvalidWriteOffsetUnder(final String baosName, final BAOSFactory baosFactory) { + public void testInvalidWriteOffsetUnder(final String baosName, final BAOSFactory baosFactory) { final AbstractByteArrayOutputStream baout = baosFactory.instance(); assertThrows(IndexOutOfBoundsException.class, () -> baout.write(null, -1, 0) @@ -120,7 +121,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testInvalidWriteOffsetOver(final String baosName, final BAOSFactory baosFactory) { + public void testInvalidWriteOffsetOver(final String baosName, final BAOSFactory baosFactory) { final AbstractByteArrayOutputStream baout = baosFactory.instance(); assertThrows(IndexOutOfBoundsException.class, () -> baout.write(new byte[0], 1, 0) @@ -129,7 +130,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testInvalidWriteLenUnder(final String baosName, final BAOSFactory baosFactory) { + public void testInvalidWriteLenUnder(final String baosName, final BAOSFactory baosFactory) { final AbstractByteArrayOutputStream baout = baosFactory.instance(); assertThrows(IndexOutOfBoundsException.class, () -> baout.write(new byte[1], 0, -1) @@ -138,7 +139,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testInvalidWriteOffsetAndLenUnder(final String baosName, final BAOSFactory baosFactory) { + public void testInvalidWriteOffsetAndLenUnder(final String baosName, final BAOSFactory baosFactory) { final AbstractByteArrayOutputStream baout = baosFactory.instance(); assertThrows(IndexOutOfBoundsException.class, () -> baout.write(new byte[1], 1, -2) @@ -147,7 +148,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testInvalidWriteOffsetAndLenOver(final String baosName, final BAOSFactory baosFactory) { + public void testInvalidWriteOffsetAndLenOver(final String baosName, final BAOSFactory baosFactory) { final AbstractByteArrayOutputStream baout = baosFactory.instance(); assertThrows(IndexOutOfBoundsException.class, () -> baout.write(new byte[1], 0, 2) @@ -156,7 +157,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testInvalidParameterizedConstruction(final String baosName, final BAOSFactory baosFactory) { + public void testInvalidParameterizedConstruction(final String baosName, final BAOSFactory baosFactory) { assertThrows(IllegalArgumentException.class, () -> baosFactory.instance(-1) ); @@ -164,7 +165,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testToInputStreamEmpty(final String baosName, final BAOSFactory baosFactory) throws IOException { + public void testToInputStreamEmpty(final String baosName, final BAOSFactory baosFactory) throws IOException { final AbstractByteArrayOutputStream baout = baosFactory.instance(); //Get data before more writes @@ -208,7 +209,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testToInputStream(final String baosName, final BAOSFactory baosFactory) throws IOException { + public void testToInputStream(final String baosName, final BAOSFactory baosFactory) throws IOException { final AbstractByteArrayOutputStream baout = baosFactory.instance(); final java.io.ByteArrayOutputStream ref = new java.io.ByteArrayOutputStream(); @@ -241,7 +242,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testToInputStreamWithReset(final String baosName, final BAOSFactory baosFactory) throws IOException { + public void testToInputStreamWithReset(final String baosName, final BAOSFactory baosFactory) throws IOException { //Make sure reset() do not destroy InputStream returned from toInputStream() final AbstractByteArrayOutputStream baout = baosFactory.instance(); final java.io.ByteArrayOutputStream ref = new java.io.ByteArrayOutputStream(); @@ -277,7 +278,7 @@ public class ByteArrayOutputStreamTestCase { @ParameterizedTest(name = "[{index}] {0}") @MethodSource("baosFactories") - public void testStream(final String baosName, final BAOSFactory baosFactory) throws Exception { + public void testStream(final String baosName, final BAOSFactory baosFactory) throws Exception { int written; //The ByteArrayOutputStream is initialized with 32 bytes to match