mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8265496: improve null check in DeflaterOutputStream/InflaterInputStream
Reviewed-by: lancea, naoto
This commit is contained in:
parent
1d37b9840a
commit
15d4787724
8 changed files with 15 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2021, 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
|
||||
|
@ -158,7 +158,7 @@ public class DeflaterOutputStream extends FilterOutputStream {
|
|||
* @since 1.7
|
||||
*/
|
||||
public DeflaterOutputStream(OutputStream out, boolean syncFlush) {
|
||||
this(out, new Deflater(), 512, syncFlush);
|
||||
this(out, out != null ? new Deflater() : null, 512, syncFlush);
|
||||
usesDefaultDeflater = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue