diff --git a/agrona/src/main/java/org/agrona/collections/ObjectHashSet.java b/agrona/src/main/java/org/agrona/collections/ObjectHashSet.java
index <HASH>..<HASH> 100644
--- a/agrona/src/main/java/org/agrona/collections/ObjectHashSet.java
+++ b/agrona/src/main/java/org/agrona/collections/ObjectHashSet.java
@@ -530,6 +530,7 @@ public class ObjectHashSet<T> extends AbstractSet<T> implements Serializable
         {
             arrayCopy[size] = null;
         }
+
         return arrayCopy;
     }
 
diff --git a/agrona/src/test/java/org/agrona/collections/ObjectHashSetIntegerTest.java b/agrona/src/test/java/org/agrona/collections/ObjectHashSetIntegerTest.java
index <HASH>..<HASH> 100644
--- a/agrona/src/test/java/org/agrona/collections/ObjectHashSetIntegerTest.java
+++ b/agrona/src/test/java/org/agrona/collections/ObjectHashSetIntegerTest.java
@@ -333,8 +333,8 @@ public class ObjectHashSetIntegerTest
     @Test(expected = NullPointerException.class)
     public void toArrayThrowsNullPointerExceptionForNullArgument()
     {
-        //noinspection ConstantConditions
-        testSet.toArray(null);
+        final Integer[] into = null;
+        testSet.toArray(into);
     }
 
     @Test
[Java] Java <I> compile issues.