Re: RFR: 8274412: Add a method to Stream API to consume and close the stream without using try-with-resources

2021-11-06 Thread Peter Levart
Hi, On 11/10/2021 20:42, John Rose wrote: To summarize: We can (and should) try to model “close-debt” using interfaces. Doing so opens up the usual cans of worms with interoperability and exceptions, but still gives us a model we can contemplate. We can (and should) contemplate how such a mod

Re: RFR: 8274412: Add a method to Stream API to consume and close the stream without using try-with-resources

2021-11-06 Thread Peter Levart
On Sun, 3 Oct 2021 11:00:25 GMT, Tagir F. Valeev wrote: > Currently, when the stream holds a resource, it's necessary to wrap it with > try-with-resources. This undermines the compact and fluent style of stream > API calls. For example, if we want to get the `List` of files inside the > direct

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Ichiroh Takiguchi
On Fri, 5 Nov 2021 20:22:03 GMT, Naoto Sato wrote: >> Do you need to add test? > >> Do you need to add test? > > I would if I could, but specifying the environment dependent settings in the > test would be fragile and error-prone, so I did not add a test but marked the > issue as `noreg-hard`.

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Alan Bateman
On Sat, 6 Nov 2021 16:04:13 GMT, Ichiroh Takiguchi wrote: > Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding > system property's fallback ? This is about running on unusual configurations where the native encoding (native.encoding and sun.jnu.encoding) doesn't name a

EmptyStream to boost performance

2021-11-06 Thread Dr Heinz M. Kabutz
Good evening, a couple of months ago a fellow Java Champion told me that he had "banned" streams at his company, or at least discouraged their use. The reason was their high allocation rates with empty collections. With traditional for loops, if the collection is empty, then hardly any object

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Ichiroh Takiguchi
On Sat, 6 Nov 2021 16:20:41 GMT, Alan Bateman wrote: >> @naotoj >> I'm not reviewer. >> Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding >> system property's fallback ? > >> Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding >> system property'

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Alan Bateman
On Sat, 6 Nov 2021 16:59:12 GMT, Ichiroh Takiguchi wrote: > In my understanding, sun.jnu.encoding property may be related file system > access. > Java may not be access to appropriate file. Yes, it's a JDK internal property with the charset name to use when decoding or encoding file names (no

Re: RFR: JDK-8276562: Fix to JDK-8263155 left out the help text changes

2021-11-06 Thread Alexander Matveev
On Fri, 5 Nov 2021 17:21:01 GMT, Andy Herrick wrote: > JDK-8276562: Fix to JDK-8263155 left out the help text changes Marked as reviewed by almatvee (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/6281

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-06 Thread Naoto Sato
On Sat, 6 Nov 2021 17:25:39 GMT, Alan Bateman wrote: >> Thanks @AlanBateman . >> In my understanding, sun.jnu.encoding property may be related file system >> access. >> Java may not be access to appropriate file. >> I mean if the file name has malformed character, it may be changed to "?". >> In

Re: RFR: 8274856: Failing jpackage tests with fastdebug/release build

2021-11-06 Thread Alexander Matveev
On Fri, 5 Nov 2021 19:58:01 GMT, Alexey Semenyuk wrote: > The fix is to isolate C++ calls in the separate forked child process on > Linux. > This change requires the passing of JLI command line arguments and values of > environment variables between two processes. Marked as reviewed by almatv