8228204: Fix for JDK-8067801 breaks java/io/NegativeInitSize.java
Reviewed-by: lancea
This commit is contained in:
parent
a7016e3b5d
commit
2c59ffda98
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -49,8 +49,10 @@ public class NegativeInitSize {
|
|||||||
("PushbackReader failed to detect negative init size");
|
("PushbackReader failed to detect negative init size");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
byte[] ba = { 123 };
|
||||||
|
ByteArrayInputStream goodbis = new ByteArrayInputStream(ba);
|
||||||
try {
|
try {
|
||||||
PushbackInputStream pbis = new PushbackInputStream(null, -1);
|
PushbackInputStream pbis = new PushbackInputStream(goodbis, -1);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new Exception
|
throw new Exception
|
||||||
@ -66,8 +68,6 @@ public class NegativeInitSize {
|
|||||||
("BufferedOutputStream failed to detect negative init size");
|
("BufferedOutputStream failed to detect negative init size");
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] ba = { 123 };
|
|
||||||
ByteArrayInputStream goodbis = new ByteArrayInputStream(ba);
|
|
||||||
try {
|
try {
|
||||||
BufferedInputStream bis = new BufferedInputStream(goodbis, -1);
|
BufferedInputStream bis = new BufferedInputStream(goodbis, -1);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user