RFR: 8274032 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/ImagePrinting/ImageTypes.java & show test UI [v2]

lawrence.andrews github.com+87324768+lawrence-andrew at openjdk.java.net
Tue Sep 21 13:59:10 UTC 2021


On Tue, 21 Sep 2021 11:56:07 GMT, lawrence.andrews <github.com+87324768+lawrence-andrew at openjdk.org> wrote:

>> test/jdk/java/awt/print/PrinterJob/ImagePrinting/ImageTypes.java line 83:
>> 
>>> 81: import static java.awt.image.BufferedImage.TYPE_INT_RGB;
>>> 82: import static java.awt.image.BufferedImage.TYPE_USHORT_555_RGB;
>>> 83: import static java.awt.image.BufferedImage.TYPE_USHORT_GRAY;
>> 
>> Thats lot of static imports from just two classes. This just looks weird. Is it recommended practice to do? I am not saying this is wrong as you are removing wild card imports, but it just does not look good to have so many statement for importing from two classes.
>
> In most of the test cases wild card is removed and its replaced with each class import statement.

Found the java doc about the static import. In this case we can use a wild card instead of importing all the static imports. 
https://docs.oracle.com/javase/7/docs/technotes/guides/language/static-import.html

-------------

PR: https://git.openjdk.java.net/jdk/pull/5595



More information about the client-libs-dev mailing list