Re: Faulty Null-Check Suspected in ToolProvider

2019-02-16 Thread Jonathan Gibbons
I still don't see why it is necessary to specify this behavior. -- Jon On 2/16/19 4:45 PM, Philipp Kunz wrote: Hi Jon, On Sat, 2019-02-16 at 13:44 -0800, Jonathan Gibbons wrote: On 2/16/19 12:20 AM, Philipp Kunz wrote: I'm also wondering about the call to flush in run(PrintStream out, PrintS

Re: Faulty Null-Check Suspected in ToolProvider

2019-02-16 Thread Philipp Kunz
Hi Jon, On Sat, 2019-02-16 at 13:44 -0800, Jonathan Gibbons wrote: > On 2/16/19 12:20 AM, Philipp Kunz wrote: > > I'm also wondering about the call to flush in run(PrintStream out, > > PrintStream err, String... args). It looks like the intention was > > to > > flush the wrapping PrintWriter. > >

Re: Faulty Null-Check Suspected in ToolProvider

2019-02-16 Thread Jonathan Gibbons
On 2/16/19 12:20 AM, Philipp Kunz wrote: I'm also wondering about the call to flush in run(PrintStream out, PrintStream err, String... args). It looks like the intention was to flush the wrapping PrintWriter. That is not possible without also flushing the underlying PrintStream. BufferedWriter.

RFE: add missing methods to Optional, OptionalInt, OptionalLong and OptionalDouble

2019-02-16 Thread Rob Spoor
I noticed that, while Stream and its primitive equivalents have multiple map and flapMap methods, Optional and its primitive equivalents were missing those. Since these can still be very useful, I wrote a patch to add the following methods: * Optional: mapToInt, mapToLong, mapToDouble, flatMap

Re: Faulty Null-Check Suspected in ToolProvider

2019-02-16 Thread Philipp Kunz
Hi again, I figured out and err deserve a null-check test as well. See patch. I'm wondering, if or how a similar check could be applied as well to ToolProvider.run(PrintWriter, PrintWriter, String...) which currently is implemented (hopefully) by each tool having to repeat the null-checks. I'm a