On 30/06/2015 14:54, Jan Lahoda wrote:

I've changed the registration to use a Callable to produce the Terminal instances instead of registering the Terminal classes:
http://cr.openjdk.java.net/~jlahoda/8080679/webrev.05/full/
delta:
http://cr.openjdk.java.net/~jlahoda/8080679/webrev.05/delta/

(I used Callable rather than Supplier, as Callable allows to throw an exception from the call method.)

How does this look?
WindowsTerminal.* looks good now. It's a pity we can't make proper use of the source code layout and move WindowsTerminal.java to windows/classes/jdk/internal/jline, same thing for UnixTerminal to unix/classes/... I would if the upstream project would be open to restructuring this as services and ServiceLoader?

Using the method references to make the initialization lazy looks okay. Remi's suggest to use getOrDefault makes it a bit nicer.

-Alan.

Reply via email to