diff a/test/jdk/java/util/Arrays/StreamAndSpliterator.java b/test/jdk/java/util/Arrays/StreamAndSpliterator.java
--- a/test/jdk/java/util/Arrays/StreamAndSpliterator.java
+++ b/test/jdk/java/util/Arrays/StreamAndSpliterator.java
@@ -26,12 +26,13 @@
  * @bug 8037857
  * @summary tests for stream and spliterator factory methods
  * @run junit StreamAndSpliterator
  */
 
-
+import java.time.LocalDate;
 import java.util.Arrays;
+import java.util.Optional;
 import java.util.Spliterators;
 
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.function.Executable;
@@ -41,40 +42,65 @@
     public void testStreamNPEs() {
         assertThrowsNPE(() -> Arrays.stream((int[]) null, 0, 0));
         assertThrowsNPE(() -> Arrays.stream((long[]) null, 0, 0));
         assertThrowsNPE(() -> Arrays.stream((double[]) null, 0, 0));
         assertThrowsNPE(() -> Arrays.stream((String[]) null, 0, 0));
+
+        assertThrowsNPE(() -> Arrays.stream((Integer[]) null, 0, 0));
+        assertThrowsNPE(() -> Arrays.stream((Long[]) null, 0, 0));
+        assertThrowsNPE(() -> Arrays.stream((Optional[]) null, 0, 0));
+        assertThrowsNPE(() -> Arrays.stream((LocalDate[]) null, 0, 0));
     }
 
     @Test
     public void testStreamAIOBEs() {
         // origin > fence
         assertThrowsAIOOB(() -> Arrays.stream(new int[]{}, 1, 0));
         assertThrowsAIOOB(() -> Arrays.stream(new long[]{}, 1, 0));
         assertThrowsAIOOB(() -> Arrays.stream(new double[]{}, 1, 0));
         assertThrowsAIOOB(() -> Arrays.stream(new String[]{}, 1, 0));
 
+        assertThrowsAIOOB(() -> Arrays.stream(new Integer[]{}, 1, 0));
+        assertThrowsAIOOB(() -> Arrays.stream(new Long[]{}, 1, 0));
+        assertThrowsAIOOB(() -> Arrays.stream(new Optional[]{}, 1, 0));
+        assertThrowsAIOOB(() -> Arrays.stream(new LocalDate[]{}, 1, 0));
+
         // bad origin
         assertThrowsAIOOB(() -> Arrays.stream(new int[]{}, -1, 0));
         assertThrowsAIOOB(() -> Arrays.stream(new long[]{}, -1, 0));
         assertThrowsAIOOB(() -> Arrays.stream(new double[]{}, -1, 0));
         assertThrowsAIOOB(() -> Arrays.stream(new String[]{}, -1, 0));
 
+        assertThrowsAIOOB(() -> Arrays.stream(new Integer[]{}, -1, 0));
+        assertThrowsAIOOB(() -> Arrays.stream(new Long[]{}, -1, 0));
+        assertThrowsAIOOB(() -> Arrays.stream(new Optional[]{}, -1, 0));
+        assertThrowsAIOOB(() -> Arrays.stream(new LocalDate[]{}, -1, 0));
+
         // bad fence
         assertThrowsAIOOB(() -> Arrays.stream(new int[]{}, 0, 1));
         assertThrowsAIOOB(() -> Arrays.stream(new long[]{}, 0, 1));
         assertThrowsAIOOB(() -> Arrays.stream(new double[]{}, 0, 1));
         assertThrowsAIOOB(() -> Arrays.stream(new String[]{}, 0, 1));
+
+        assertThrowsAIOOB(() -> Arrays.stream(new Integer[]{}, 0, 1));
+        assertThrowsAIOOB(() -> Arrays.stream(new Long[]{}, 0, 1));
+        assertThrowsAIOOB(() -> Arrays.stream(new Optional[]{}, 0, 1));
+        assertThrowsAIOOB(() -> Arrays.stream(new LocalDate[]{}, 0, 1));
     }
 
 
     @Test
     public void testSpliteratorNPEs() {
         assertThrowsNPE(() -> Arrays.spliterator((int[]) null, 0, 0));
         assertThrowsNPE(() -> Arrays.spliterator((long[]) null, 0, 0));
         assertThrowsNPE(() -> Arrays.spliterator((double[]) null, 0, 0));
         assertThrowsNPE(() -> Arrays.spliterator((String[]) null, 0, 0));
+
+        assertThrowsNPE(() -> Arrays.spliterator((Integer[]) null, 0, 0));
+        assertThrowsNPE(() -> Arrays.spliterator((Long[]) null, 0, 0));
+        assertThrowsNPE(() -> Arrays.spliterator((Optional[]) null, 0, 0));
+        assertThrowsNPE(() -> Arrays.spliterator((LocalDate[]) null, 0, 0));
     }
 
     @Test
     public void testSpliteratorAIOBEs() {
         // origin > fence
@@ -101,10 +127,15 @@
     public void testSpliteratorNPEsFromSpliterators() {
         assertThrowsNPE(() -> Spliterators.spliterator((int[]) null, 0, 0, 0));
         assertThrowsNPE(() -> Spliterators.spliterator((long[]) null, 0, 0, 0));
         assertThrowsNPE(() -> Spliterators.spliterator((double[]) null, 0, 0, 0));
         assertThrowsNPE(() -> Spliterators.spliterator((String[]) null, 0, 0, 0));
+
+        assertThrowsNPE(() -> Spliterators.spliterator((Integer[]) null, 0, 0, 0));
+        assertThrowsNPE(() -> Spliterators.spliterator((Long[]) null, 0, 0, 0));
+        assertThrowsNPE(() -> Spliterators.spliterator((Optional[]) null, 0, 0, 0));
+        assertThrowsNPE(() -> Spliterators.spliterator((LocalDate[]) null, 0, 0, 0));
     }
 
     @Test
     public void testSpliteratorAIOBEsFromSpliterators() {
         // origin > fence
