changeset 55729:68deaa66130c

8228204: Fix for JDK-8067801 breaks java/io/NegativeInitSize.java Reviewed-by: lancea
author bpb
date Wed, 17 Jul 2019 15:12:30 -0700
parents 978350939943
children 94f8a0b34117
files test/jdk/java/io/NegativeInitSize.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/io/NegativeInitSize.java	Wed Jul 17 14:24:37 2019 -0700
+++ b/test/jdk/java/io/NegativeInitSize.java	Wed Jul 17 15:12:30 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,8 +49,10 @@
                 ("PushbackReader failed to detect negative init size");
         }
 
+        byte[] ba = { 123 };
+        ByteArrayInputStream goodbis = new ByteArrayInputStream(ba);
         try {
-            PushbackInputStream pbis = new PushbackInputStream(null, -1);
+            PushbackInputStream pbis = new PushbackInputStream(goodbis, -1);
         } catch (IllegalArgumentException e) {
         } catch (Exception e) {
             throw new Exception
@@ -66,8 +68,6 @@
                 ("BufferedOutputStream failed to detect negative init size");
         }
 
-        byte[] ba = { 123 };
-        ByteArrayInputStream goodbis = new ByteArrayInputStream(ba);
         try {
             BufferedInputStream bis = new BufferedInputStream(goodbis, -1);
         } catch (IllegalArgumentException e) {