Integrated: 8287440: Typo in package-info.java of java.util.random

2022-05-29 Thread Anthony Vanelverdinghe
On Wed, 18 May 2022 11:45:46 GMT, Anthony Vanelverdinghe wrote: > The change is trivial, but I'll need help from someone to create a JBS issue > & sponsor this PR. This pull request has now been integrated. Changeset: 3d2d0395 Author: Anthony Vanelverdinghe Committer: Jaikira

Re: RFR: 8287440: Typo in package-info.java of java.util.random

2022-05-28 Thread Anthony Vanelverdinghe
On Sat, 28 May 2022 10:00:50 GMT, Jaikiran Pai wrote: >> The change is trivial, but I'll need help from someone to create a JBS issue >> & sponsor this PR. > > @anthonyvdotbe, can you also please change the copyright year on that file > from `Copyright (c) 2021,` to `Copyright (c) 2021, 2022,`

Re: RFR: 8287440: Typo in package-info.java of java.util.random [v2]

2022-05-28 Thread Anthony Vanelverdinghe
> The change is trivial, but I'll need help from someone to create a JBS issue > & sponsor this PR. Anthony Vanelverdinghe has updated the pull request incrementally with one additional commit since the last revision: Correct copyright year Signed-off-by: Anthony Vane

RFR: 8287440: Typo in package-info.java of java.util.random

2022-05-27 Thread Anthony Vanelverdinghe
The change is trivial, but I'll need help from someone to create a JBS issue & sponsor this PR. - Commit messages: - Copy edit: remove pleonasm Changes: https://git.openjdk.java.net/jdk/pull/8766/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8766=00 Issue:

Re: RFR: 8279031: Add API note to ToolProvider about being reusable/reentrant [v2]

2022-05-24 Thread Anthony Vanelverdinghe
On Tue, 24 May 2022 04:50:58 GMT, Jaikiran Pai wrote: >> Christian Stein has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update src/java.base/share/classes/java/util/spi/ToolProvider.java >>

Re: RFR: 8279031: Add API note to ToolProvider about being reusable/reentrant [v2]

2022-05-23 Thread Anthony Vanelverdinghe
e src/java.base/share/classes/java/util/spi/ToolProvider.java > > Co-authored-by: Anthony Vanelverdinghe src/java.base/share/classes/java/util/spi/ToolProvider.java line 57: > 55: * reusable and reentrant, or should clearly document any limitations and > 56: * restrictions. In this

Re: RFR: JDK-8277095 : Empty streams create too many objects

2021-11-15 Thread Anthony Vanelverdinghe
On Sun, 7 Nov 2021 07:51:06 GMT, Michael Bien wrote: >>> wouldn't this make streams no longer lazy if the collection is empty? >>> >>> ```java >>> List list = new ArrayList<>(); >>> Stream stream = list.stream(); >>> >>> list.addAll(List.of("one", "two", "three")); >>>

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs [v3]

2021-11-10 Thread Anthony Vanelverdinghe
On Wed, 10 Nov 2021 09:43:58 GMT, Hendrik Schreiber wrote: >>> When I see ``, I'm just wondering what those <> type operators are >>> good for here... >> >> What about just replacing `` with `...` then? The `State` >> constructor and its invocation also have an ellipsis. >> >>> BUT, at

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-09 Thread Anthony Vanelverdinghe
On Tue, 9 Nov 2021 08:59:32 GMT, Hendrik Schreiber wrote: >> The new example Cleaner instance _is_ shared, though on a pretty small scale >> (just among instances of CleaningExample). A demonstration of larger scale >> sharing of a Cleaner instance would be out of scope for this example. > >

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Anthony Vanelverdinghe
On Fri, 22 Oct 2021 08:03:34 GMT, Hendrik Schreiber wrote: > Trivial improvement. > > Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. > Repeat (again) in the code example that the `State` `Runnable `should be > implemented as static class and not reference the

Re: RFR: JDK-8276650: GenGraphs does not produce deterministic output

2021-11-04 Thread Anthony Vanelverdinghe
On Thu, 4 Nov 2021 19:28:58 GMT, Mandy Chung wrote: > The dot graph should print the edges in alphatical order. A simple fix to > sort the edges before printing them. src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModuleDotGraph.java line 336: > 334: private final String name; >

Re: RFR: 8266846: Add java.time.InstantSource

2021-05-15 Thread Anthony Vanelverdinghe
On Thu, 13 May 2021 20:52:33 GMT, Stephen Colebourne wrote: > 8266846: Add java.time.InstantSource A nice addition to the JDK, thanks for taking this on. src/java.base/share/classes/java/time/Clock.java line 114: > 112: * provides access to the current instant, and does not provide access

Re: ReversibleCollection proposal

2021-05-13 Thread Anthony Vanelverdinghe
Hi Stuart Will EnumSet also be updated to implement ReversibleSet? Or will it be updated to implement NavigableSet [1] independently of this enhancement? I'd also like to propose adding `ReversibleSet::of` factory methods. This is something I miss having on SortedSet occasionally, but

Re: [External] : Re: ReversibleCollection proposal

2021-05-13 Thread Anthony Vanelverdinghe
Hi Rémi The discussion "new types? or new default methods?" is indeed a valid one. In fact, I think this choice has already been made once in favor of a default method, when adding `List::sort` was chosen over adding `SortedList` (though I imagine that choice was a no-brainer). In this case I

Re: ReversibleCollection proposal

2021-04-27 Thread Anthony Vanelverdinghe
On Tuesday, April 27, 2021 11:25 CEST, Peter Levart wrote: > Now just some of my thoughts about the proposal: > > - SortedSet.addFirst/.addLast - I think an operation that would be used > in situations like: "I know this element should always be greater than > any existing element in the set and

Re: ReversibleCollection proposal

2021-04-17 Thread Anthony Vanelverdinghe
On Saturday, April 17, 2021 11:48 CEST, Stephen Colebourne wrote: > On Fri, 16 Apr 2021 at 18:41, Stuart Marks wrote: > > This is a proposal to add a ReversibleCollection interface to the > > Collections > > Framework. I'm looking for comments on overall design before I work on > > detailed

Re: Insufficiencies in JEP: 400: UTF-8 by Default

2021-03-30 Thread Anthony Vanelverdinghe
Hi Alan As Marco mentioned, another use case is sub-process stdin/stdout/stderr. In my particular instance, I'm starting a Process which has its output redirected to a file. It uses the platform's default encoding for writing to stdout. So when I want to read its output from the file at some

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-04 Thread Anthony Vanelverdinghe
Hi Julia Since short-circuiting sounds similar to a Subscriber cancelling its Subscription, I believe it might be worthwhile to consider the Flow API. If the argument would be a `Flow.Processor`, then the implementation would publish instances of T to it, subscribe to receive instances of R,

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-07-04 Thread Anthony Vanelverdinghe
, A> transformer() {     return (stream, intermediary) -> {     var accumulator = accumulator();     stream.forEachOrdered(t -> accumulator.accept(intermediary, t));     };     } } Kind regards, Patrick On 25 Jun 2020, at 18:12, Anthony Vanelverdinghe wro

Re: RFR[8238286]: 'Add new flatMap stream operation that is more amenable to pushing’

2020-06-25 Thread Anthony Vanelverdinghe
Hi Given the signature of flatMap is: Stream flatMap​(FunctionR>> mapper) I'd like to propose the following signature for the new method: Stream builderMap(BiConsumerStream.Builder> mapper) This way both methods are named "...Map", and the name "builderMap" follows naturally from the

Trivial patches for typos in java.base

2020-04-26 Thread Anthony Vanelverdinghe
Hi I filed 2 bug reports for typos in java.base Javadoc: https://bugs.openjdk.java.net/browse/JI-9064752 with patch diff --git a/src/java.base/share/classes/java/lang/invoke/package-info.java b/src/java.base/share/classes/java/lang/invoke/package-info.java index 82600d4866..a0ad09b03e

RE: Suggestion for a more sensible implementation of EMPTY_MAP

2019-06-19 Thread Anthony Vanelverdinghe
Hi Abraham Wouldn’t it have been possible to use Map::isEmpty? Ideally just returning at the very beginning of your method if `data` is an empty Map. That way you’d still be able to use computeIfPresent, and use emptyMap() as well. Kind regards, Anthony

RE: [PATCH] 4511638: Double.toString(double) sometimes produces incorrect results

2019-06-17 Thread Anthony Vanelverdinghe
-April/059783.html From: Raffaello Giulietti Sent: Monday, June 17, 2019 4:56:22 PM To: Anthony Vanelverdinghe; core-libs-dev Subject: Re: [PATCH] 4511638: Double.toString(double) sometimes produces incorrect results Hi Anthony, On 16/06/2019 19.17, Anthony

RE: [PATCH] 4511638: Double.toString(double) sometimes produces incorrect results

2019-06-16 Thread Anthony Vanelverdinghe
Hi Raffaello While I don't have feedback on the actual math, here's a few suggestions: - there's some use of non-ASCII characters in the patch. I don't think this is common in the JDK's Java sources, so you might want to replace them with their Unicode escapes. The characters are: ≤

RE: ZipFileSystem performance regression

2019-04-18 Thread Anthony Vanelverdinghe
Hi Alan already proposed the following RFEs when NIO2 was introduced: a memory FileSystemProvider [1], and a virtual FileSystemProvider [2] With these, the javac use case could work as follows: 1) create a VirtualFileSystem, with all sources mounted under “/src”, a MemoryFileSystem mounted

RE: RFR - JDK-8203442 String::transform (Code Review)

2018-11-14 Thread Anthony Vanelverdinghe
Hi Remi, Brian, What about ‘asInputTo’ or some variant thereof (e.g. using Argument or the abbreviated Arg instead of Input; or dropping/replacing either of the prefix/suffix)? This would give, for example: `raw html`.asInputTo(HtmlDocument::new)

RE: JDK-8124977: deadlock between engineers? (cmdline encoding challenges on Windows)

2018-09-14 Thread Anthony Vanelverdinghe
ks, > Sherman > > [1] > http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-February/039070.html > [2] http://cr.openjdk.java.net/~kshoop/8124977/webrev.05/ > [3] > http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-February/039068.html > > On 9/12/18, 10

JDK-8124977: deadlock between engineers? (cmdline encoding challenges on Windows)

2018-09-12 Thread Anthony Vanelverdinghe
Hi What is the status of this issue [1]? It addresses some long-standing issues with Java's Unicode support on Windows and was contributed by a team of Microsoft engineers. However, it seems to have gone dormant right before the finish line, and I can't really figure out who's waiting for whom

Re: Optional.isEmpty()

2017-04-24 Thread Anthony Vanelverdinghe
Hi Peter I'd say no: it's merely the negation of an existing method, and given that the bar for adding methods to Optional is set very high (see e.g. [1] and [2]), I don't see how this one would meet it. Moreover, I don't see any issues with simply writing: return

Re: Shouldn't InputStream/Files::readAllBytes throw something other than OutOfMemoryError?

2017-03-12 Thread Anthony Vanelverdinghe
chance the OS really couldn't allocate a thread for the reason of no main memory available is very narrow :) Chris Am 3/12/2017 um 3:24 PM schrieb Anthony Vanelverdinghe: Files::readAllBytes is specified to throw an OutOfMemoryError "if an array of the required size cannot be allocated, for e

Shouldn't InputStream/Files::readAllBytes throw something other than OutOfMemoryError?

2017-03-12 Thread Anthony Vanelverdinghe
Files::readAllBytes is specified to throw an OutOfMemoryError "if an array of the required size cannot be allocated, for example the file is larger that 2G". Now in Java 9, InputStream::readAllBytes does the same. However, this overloads the meaning of OutOfMemoryError: either "the JVM is out

Re: PING: RFR: JDK-4347142: Need method to set Password protection to Zip entries

2016-04-08 Thread Anthony Vanelverdinghe
Hi Yuji, Sherman et al. PKWARE's "Strong Encryption Specification" [1] indeed warns about patents, but how/why does this affect Winzip's AE-1 and AE-2 [2]? I don't mind if decryption support is added for the "Traditional Encryption". However, I believe it would be wrong to introduce

Re: RFR 8124977 cmdline encoding challenges on Windows

2015-06-23 Thread Anthony Vanelverdinghe
Hi Thanks for taking on these challenges. I would like to be able to associate file types with a Java program [1]. Currently, the Java program doesn't receive the argument (i.e. the path to the file that was double-clicked) correctly if it contains Unicode characters. I assume this would be

Unicode command-line parameters on Windows

2015-05-01 Thread Anthony Vanelverdinghe
Hi I would like to use a Java program for Windows file associations. However, this doesn't work when the file to be opened contains non-ASCII Unicode characters in its path. There are several related issues about Windows Unicode support (e.g. JDK-4488646, JDK-4519026, JDK-4900150,

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-11 Thread Anthony Vanelverdinghe
Thanks for your clarifications Roger. I'm very much in favor of your suggestion for naming the method supportsNormalTermination. Kind regards, Anthony On 11/04/2015 20:35, Roger Riggs wrote: Hi Anthony, Thanks for the review and comments. On 4/11/2015 5:00 AM, Anthony Vanelverdinghe wrote

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-11 Thread Anthony Vanelverdinghe
Hi Roger In my opinion, the method supportsDestroyForcibly is unintuitive, for the following 2 reasons: - it's named supportsXxx, where Xxx is the name of a method in the same class. So as a user of this API, I would intuitively assume that supportsDestroyForcibly is related to

Re: JEP 102 Process Updates revised API draft

2015-02-10 Thread Anthony Vanelverdinghe
Hi Roger This looks great already. My feedback is about process destruction: Why isn't ProcessHandle::isDestroyForcible a static method? For ProcessHandle::destroy and Process::destroy, I'd like to propose replacing Whether the process represented by this Process object is forcibly