commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [commons-io] branch master updated: Fix warnings
Date Fri, 07 Aug 2020 23:36:29 GMT
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 <sebb@apache.org>
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


Mime
View raw message