mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8263190: Update java.io, java.math, and java.text to use instanceof pattern variable
Reviewed-by: lancea, bpb, darcy, naoto, iris, dfuchs, smarks, redestad
This commit is contained in:
parent
4f0a12ec87
commit
0f2402d0a2
15 changed files with 32 additions and 59 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 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
|
||||
|
@ -369,8 +369,7 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput {
|
|||
throw new UTFDataFormatException(tooLongMsg(str, utflen));
|
||||
|
||||
final byte[] bytearr;
|
||||
if (out instanceof DataOutputStream) {
|
||||
DataOutputStream dos = (DataOutputStream)out;
|
||||
if (out instanceof DataOutputStream dos) {
|
||||
if (dos.bytearr == null || (dos.bytearr.length < (utflen + 2)))
|
||||
dos.bytearr = new byte[(utflen*2) + 2];
|
||||
bytearr = dos.bytearr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue