On Sun, 10 Jan 2021 19:55:02 GMT, Attila Szegedi <[email protected]> wrote:
>> A long time ago in the pre-1.0 era, this field was initialized via
>> reflection since the "InputStream" class was optional. This was changed
>> since then and a separate field to refer the "InputStream.class" is not
>> needed.
>
> src/java.datatransfer/share/classes/java/awt/datatransfer/DataFlavor.java
> line 1160:
>
>> 1158: */
>> 1159: public boolean isRepresentationClassInputStream() {
>> 1160: return
>> java.io.InputStream.class.isAssignableFrom(representationClass);
>
> Suggestion:
>
> return InputStream.class.isAssignableFrom(representationClass);
> The class is already imported on line 32.
This is the style used by the various methods in this class to highlight an
exact used type.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2016