On 08/24/2018 12:09 PM, Remi Forax wrote:
Hi Christoph,
getWidth() and getHeight() should be instance methods and not static methods, 
providing the weight or the height if there is no console seems weird.
Also, they should be named width() and height() given the rest of the methods of 
java.io.Console doesn't use the "get" convention.

regards,
Rémi

They could also return OptionalInt to force user to think about "not-available" situations.

Regards, Peter


----- Mail original -----
De: "Christoph Langer" <christoph.lan...@sap.com>
À: "core-libs-dev" <core-libs-dev@openjdk.java.net>
Cc: "Baesken, Matthias" <matthias.baes...@sap.com>
Envoyé: Vendredi 24 Août 2018 11:33:05
Objet: RFR: 8209937: Enhance java.io.Console - provide methods to query console 
width and height
Hi,

please review and give feedback for this augmentation of java.io.Console.

We have users that have the need to query for Width and Height of the console
device in Java. In our own JVM implementation we had given them this hook as a
custom extension already quite some time ago. We think, however, that it is a
worthwhile augmentation of java.io.Console.

Bug: https://bugs.openjdk.java.net/browse/JDK-8209937
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8209937.0/

I'll also open a CSR for this, but I'll wait for some feedback on our proposal
first.

Thanks & Best regards
Christoph

Reply via email to