[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] 8187898: PrintStream should override FilterOutputStream#write(byte[]) with a me
From:       Brian Burkhalter <brian.burkhalter () oracle ! com>
Date:       2019-07-22 15:15:26
Message-ID: 426428C0-F710-4262-9E5A-247D0D267059 () oracle ! com
[Download RAW message or body]

> On Jul 20, 2019, at 9:15 AM, Alan Bateman <Alan.Bateman@oracle.com> wrote:
> 
> On 18/07/2019 16:32, Brian Burkhalter wrote:
> > Resuming this topic, what is the general view on the three possible paths:
> > 
> > 1. Override write(byte[]) at the risk of incompatibility.
> > 2. Instead add writeBytes(byte[]) as in ByteArrayOutputStream.
> > 3. Resolve as Won't Fix.
> > 
> > For 2 or 3 the incorrect class level statement about overriding all methods not \
> > to throw IOE would need to be dealt with. 
> PrintStream dates from JDK 1.0 so I don't think it's feasible to add an override \
> now that doesn't throw IOE.

Agreed.

> Tagir's suggestion to add a writeBytes(byte[]) seem fine, assuming there is a great \
> need.

Not sure of the need but there is the precedent of BAIS.

> Alternatively you can add an override (that throws IOE) so that you have somewhere \
> for an @apiNote that suggests using write(b,0,b.len) as "exception-less" write.

That's a good idea.

Thanks,

Brian


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" \
class=""><div class="">On Jul 20, 2019, at 9:15 AM, Alan Bateman &lt;<a \
href="mailto:Alan.Bateman@oracle.com" class="">Alan.Bateman@oracle.com</a>&gt; \
wrote:</div><br class="Apple-interchange-newline"><div class=""><span \
style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; \
float: none; display: inline !important;" class="">On 18/07/2019 16:32, Brian \
Burkhalter wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><blockquote type="cite" style="font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; \
text-indent: 0px; text-transform: none; white-space: normal; widows: auto; \
word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class="">Resuming this topic, what is the general view on the \
three possible paths:<br class=""><br class="">1. Override write(byte[]) at the risk \
of incompatibility.<br class="">2. Instead add writeBytes(byte[]) as in \
ByteArrayOutputStream.<br class="">3. Resolve as Won't Fix.<br class=""><br \
class="">For 2 or 3 the incorrect class level statement about overriding all methods \
not to throw IOE would need to be dealt with.<br class=""><br \
class=""></blockquote><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none; float: none; display: inline !important;" class="">PrintStream \
dates from JDK 1.0 so I don't think it's feasible to add an override now that doesn't \
throw IOE.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""></div></blockquote><div><br \
class=""></div>Agreed.</div><div><br class=""><blockquote type="cite" class=""><div \
class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none; float: none; display: inline !important;" class="">Tagir's \
suggestion to add a writeBytes(byte[]) seem fine, assuming there is a great \
need.</span></div></blockquote><div><br class=""></div>Not sure of the need but there \
is the precedent of BAIS.</div><div><br class=""><blockquote type="cite" \
class=""><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline \
!important;" class="">Alternatively you can add an override (that throws IOE) so that \
you have somewhere for an @apiNote that suggests using write(b,0,b.len) as \
"exception-less" write.</span></div></blockquote></div><br class=""><div \
class="">That's a good idea.</div><div class=""><br class=""></div><div \
class="">Thanks,</div><div class=""><br class=""></div><div \
class="">Brian</div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic