[OpenJDK 2D-Dev] JDK 9: RFR: 8033716: Fix raw and unchecked lint warnings in com.sun.imageio

Henry Jen henry.jen at oracle.com
Sat Feb 8 00:27:14 UTC 2014

On 02/07/2014 03:00 PM, Phil Race wrote:
> BMPMetadata.java
>   94     // Fields from CommentExtension
>    95     // List of byte[]
>   96     public List<byte[]> comments = null; // new ArrayList();
> hmm .. how did you decide this was correct, other than trusting the
> comment?

For this one, I took it from the comment, after verified similar types 
in GIF.

> The thing is I can't actually see where this field is used and I'm inclined
> to think this was a copy/paste from the GIF code.
> It would seem the right thing to do is delete these lines.

It is public, so I don't dare to remove it, although it seems like 
nothing in com.sun.imageio ever make use of this field.

Also, from the BMPMetadataFormat, CommentExtension is a string type, so 
I am not really sure what's the best to do here.

If you think it is safe to remove it, I am more than happy to remove it.

> In the case of GIFImageMetadata they are used but you left the comments
> saying
> // new ArrayList();
> since it looks like you use the diamond operator now that should
> not be completely true. Either remove the comment or, since it
> seems it was intended to be informative update it to say
> // new ArrayList<>();

Agree, I'll remove those comments.

> I will have to look at all the subsequent files later ..

Thanks for reviewing it.


More information about the 2d-dev mailing list