RFR: 8209937: Enhance java.io.Console - provide methods to query console width and height

Remi Forax forax at univ-mlv.fr
Fri Aug 24 10:09:47 UTC 2018


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

----- Mail original -----
> De: "Christoph Langer" <christoph.langer at sap.com>
> À: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Cc: "Baesken, Matthias" <matthias.baesken at 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


More information about the core-libs-dev mailing list