Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-20 Thread Dmitry Markov
+1

Regards,
Dmitry

> On 19 Aug 2020, at 23:03, Alexey Ivanov  wrote:
> 
> Looks good.
> 
> Regards,
> Alexey
> 
> On 18/08/2020 15:23, Kumar Abhishek wrote:
>> Hi Alexey,
>> 
>> Please find the updated Webrev link here:- 
>> http://cr.openjdk.java.net/~arapte/Abhishek/8200281/webrev.05
>> I have updated the missed annotation.
>> 
>> 
>> Thanks,
>> Abhishek
>> -Original Message-
>> From: Alexey Ivanov
>> Sent: Tuesday, August 18, 2020 2:26 AM
>> To: Kumar Abhishek 
>> Cc: Dmitry Markov ; Philip Race 
>> ; 2d-dev <2d-dev@openjdk.java.net>
>> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
>> annotations in ImageIO plugins
>> 
>> Hi Abhishek,
>> 
>> We're getting closer but some annotations from those I listed in my previous 
>> email are still missing:
>> 
>> *BMPImageReader.java*
>> 
>> 2067 public Boolean run() {
>> 
>> 
>> *JPEGImageReader.java*
>> 
>> 954 protected ImageTypeSpecifier produce() {
>> 
>> 
>> *TIFFImageWriter.java*
>> 
>> I also found one more missing @Override:
>> 3687 public Raster getTile(int tileX, int tileY) {
>> 
>> 
>> *WBMPImageReader.java*
>> 
>> Shall we also sort the imports? I mean move:
>>43 import java.io.IOException;
>>44 import java.util.ArrayList;
>>45 import java.util.Iterator;
>> to be after
>>33 import java.awt.image.WritableRaster;
>> 
>> Though It's fine with me as is.
>> 
>> 
>> Regards,
>> Alexey
>> 
>> 



Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-19 Thread Alexey Ivanov

Looks good.

Regards,
Alexey

On 18/08/2020 15:23, Kumar Abhishek wrote:

Hi Alexey,

Please find the updated Webrev link here:- 
http://cr.openjdk.java.net/~arapte/Abhishek/8200281/webrev.05
I have updated the missed annotation.


Thanks,
Abhishek
-Original Message-
From: Alexey Ivanov
Sent: Tuesday, August 18, 2020 2:26 AM
To: Kumar Abhishek 
Cc: Dmitry Markov ; Philip Race ; 
2d-dev <2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

Hi Abhishek,

We're getting closer but some annotations from those I listed in my previous 
email are still missing:

*BMPImageReader.java*

2067 public Boolean run() {


*JPEGImageReader.java*

954 protected ImageTypeSpecifier produce() {


*TIFFImageWriter.java*

I also found one more missing @Override:
3687 public Raster getTile(int tileX, int tileY) {


*WBMPImageReader.java*

Shall we also sort the imports? I mean move:
    43 import java.io.IOException;
    44 import java.util.ArrayList;
    45 import java.util.Iterator;
to be after
    33 import java.awt.image.WritableRaster;

Though It's fine with me as is.


Regards,
Alexey




Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-18 Thread Kumar Abhishek
Hi Alexey,

Please find the updated Webrev link here:- 
http://cr.openjdk.java.net/~arapte/Abhishek/8200281/webrev.05
I have updated the missed annotation.


Thanks,
Abhishek
-Original Message-
From: Alexey Ivanov 
Sent: Tuesday, August 18, 2020 2:26 AM
To: Kumar Abhishek 
Cc: Dmitry Markov ; Philip Race 
; 2d-dev <2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

Hi Abhishek,

We're getting closer but some annotations from those I listed in my previous 
email are still missing:

*BMPImageReader.java*

2067 public Boolean run() {


*JPEGImageReader.java*

954 protected ImageTypeSpecifier produce() {


*TIFFImageWriter.java*

I also found one more missing @Override:
3687 public Raster getTile(int tileX, int tileY) {


*WBMPImageReader.java*

Shall we also sort the imports? I mean move:
   43 import java.io.IOException;
   44 import java.util.ArrayList;
   45 import java.util.Iterator;
to be after
   33 import java.awt.image.WritableRaster;

Though It's fine with me as is.


Regards,
Alexey

On 12/08/2020 13:30, Kumar Abhishek wrote:
> Hi Alexey,
>
> Thank you for looking into it.
>
> I have updated the code with  below suggestion.
> Please find the updated Webrev:-
> Webrev link : http://cr.openjdk.java.net/~jdv/8200281/webrev.04/
>
>
> Thanks,
> Abhishek
>
> -Original Message-
> From: Alexey Ivanov
> Sent: Thursday, August 6, 2020 3:20 AM
> To: Kumar Abhishek 
> Cc: Dmitry Markov ; Philip Race 
> ; 2d-dev <2d-dev@openjdk.java.net>
> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
> annotations in ImageIO plugins
>
> Hi Abhishek,
>
> *BMPImageReader.java*
>
> 
>
> Missing @Override annotation:
> 2045 public Boolean run() {
>
>
> 
>
> *JPEGImageReader.java*
>
> Missing @Override annotation:
>    953 protected ImageTypeSpecifier produce() {
>
>
> 
>
> Regards,
> Alexey


Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-17 Thread Alexey Ivanov

Hi Abhishek,

We're getting closer but some annotations from those I listed in my 
previous email are still missing:


*BMPImageReader.java*

2067 public Boolean run() {


*JPEGImageReader.java*

954 protected ImageTypeSpecifier produce() {


*TIFFImageWriter.java*

I also found one more missing @Override:
3687 public Raster getTile(int tileX, int tileY) {


*WBMPImageReader.java*

Shall we also sort the imports? I mean move:
  43 import java.io.IOException;
  44 import java.util.ArrayList;
  45 import java.util.Iterator;
to be after
  33 import java.awt.image.WritableRaster;

Though It's fine with me as is.


Regards,
Alexey

On 12/08/2020 13:30, Kumar Abhishek wrote:

Hi Alexey,

Thank you for looking into it.

I have updated the code with  below suggestion.
Please find the updated Webrev:-
Webrev link : http://cr.openjdk.java.net/~jdv/8200281/webrev.04/


Thanks,
Abhishek

-Original Message-
From: Alexey Ivanov
Sent: Thursday, August 6, 2020 3:20 AM
To: Kumar Abhishek 
Cc: Dmitry Markov ; Philip Race ; 
2d-dev <2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

Hi Abhishek,

*BMPImageReader.java*



Missing @Override annotation:
2045 public Boolean run() {




*JPEGImageReader.java*

Missing @Override annotation:
   953 protected ImageTypeSpecifier produce() {




Regards,
Alexey


Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-12 Thread Kumar Abhishek
Hi Alexey,

Thank you for looking into it.

I have updated the code with  below suggestion.
Please find the updated Webrev:-
Webrev link : http://cr.openjdk.java.net/~jdv/8200281/webrev.04/


Thanks,
Abhishek

-Original Message-
From: Alexey Ivanov 
Sent: Thursday, August 6, 2020 3:20 AM
To: Kumar Abhishek 
Cc: Dmitry Markov ; Philip Race 
; 2d-dev <2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

Hi Abhishek,

*BMPImageReader.java*

When @Override is added to anonymous classes, the annotation is not aligned to 
the method declaration; at time the indentation of the method declaration is 
unnecessarily modified:

1937 @Override
1938 public void imageProgress(ImageReader source, in the original 
file
1927 public void imageProgress(ImageReader source,

But it's not easy to see in the webrev because it ignored indent change on the 
lines 1927/1938.

These are misaligned and are seen clearly:
1946 @Override
1958 @Override
1964 @Override
1977 @Override
1988 @Override
1998 @Override

This changes the indentation of the method declaration:
1980 @Override
1981 public void thumbnailPassStarted(ImageReader source,


Missing @Override annotation:
2045 public Boolean run() {


Since we're doing clean-up, a couple more warning can be addressed:

1. There are several unused imports which can be removed.

2. There are two wildcard imports:
   63 import java.io.*;
   64 import java.nio.*;
Shall we expand them into specific imports or leave as is?

3. The class can be made static:
2019 private class EmbeddedProgressAdapter implements 
IIOReadProgressListener {


*BMPImageWriter.java*

Missing @Override annotation:
1348 public void imageProgress(ImageWriter source, 
float percentageDone) {
1354 public void warningOccurred(ImageWriter source, 
int imageIndex, String warning) {

The class can be made static:
1384 private class IIOWriteProgressAdapter implements 
IIOWriteProgressListener {


*GIFImageWriter.java*

There are a couple unused imports which can be removed.


*JPEGImageReader.java*

Missing @Override annotation:
   91 public Void run() {
  953 protected ImageTypeSpecifier produce() {
1811  public boolean hasNext() {
1825  public ImageTypeSpecifier next() {
1835  public void remove() {


*JPEGImageWriter.java*

Missing @Override annotation:
179 public Void run() {


*PNGImageReader.java*

Missing @Override annotation:
76 public InputStream nextElement() {
86 public boolean hasMoreElements() {

This file has been updated since the time this webrev was created; thus 
the copyright update does not apply.


*WBMPImageReader.java*

This file has a wildcard import:
43 import java.io.*;
Shall we expand it as in BMPImageReader.java?


*WBMPImageWriter.java*

Missing @Override annotation:
137 public boolean canWriteRasters() {


Regards,
Alexey

>> On 30 Jul 2020, at 07:10, Kumar Abhishek  wrote:
>>
>> Hi Dmitry,
>>
>> I have updated the year in the copyright section for the modified file.
>> Please find the updated Webrev:-
>> http://cr.openjdk.java.net/~jdv/8200281/webrev.03/
>>
>>
>> Thanks,
>> Abhishek
>>
>> 
>>
>> -Original Message-
>> From: Alexey Ivanov
>> Sent: Saturday, July 25, 2020 2:38 AM
>> To: Kumar Abhishek 
>> Cc: Philip Race ; 2d-dev
>> <2d-dev@openjdk.java.net>
>> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override
>> annotations in ImageIO plugins
>>
>> Hi Abhishek,
>>
>> 
>>
>> So the patch is incomplete.
>> Please verify you add @Override annotation to all overridden methods in 
>> these classes.
>>
>>
>> Regards,
>> Alexey


Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-05 Thread Alexey Ivanov
There are also several unused imports in WBMPImageWriter.java which can 
be removed.


On 05/08/2020 22:49, Alexey Ivanov wrote:

*WBMPImageWriter.java*

Missing @Override annotation:
137 public boolean canWriteRasters() { 

--
Regards,
Alexey


Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-08-05 Thread Alexey Ivanov

Hi Abhishek,

*BMPImageReader.java*

When @Override is added to anonymous classes, the annotation is not 
aligned to the method declaration; at time the indentation of the method 
declaration is unnecessarily modified:


1937 @Override
1938 public void imageProgress(ImageReader source,
in the original file
1927 public void imageProgress(ImageReader source,

But it's not easy to see in the webrev because it ignored indent change 
on the lines 1927/1938.


These are misaligned and are seen clearly:
1946 @Override
1958 @Override
1964 @Override
1977 @Override
1988 @Override
1998 @Override

This changes the indentation of the method declaration:
1980 @Override
1981 public void thumbnailPassStarted(ImageReader source,


Missing @Override annotation:
2045 public Boolean run() {


Since we're doing clean-up, a couple more warning can be addressed:

1. There are several unused imports which can be removed.

2. There are two wildcard imports:
  63 import java.io.*;
  64 import java.nio.*;
Shall we expand them into specific imports or leave as is?

3. The class can be made static:
2019 private class EmbeddedProgressAdapter implements 
IIOReadProgressListener {



*BMPImageWriter.java*

Missing @Override annotation:
1348 public void imageProgress(ImageWriter source, 
float percentageDone) {
1354 public void warningOccurred(ImageWriter source, 
int imageIndex, String warning) {


The class can be made static:
1384 private class IIOWriteProgressAdapter implements 
IIOWriteProgressListener {



*GIFImageWriter.java*

There are a couple unused imports which can be removed.


*JPEGImageReader.java*

Missing @Override annotation:
  91 public Void run() {
 953 protected ImageTypeSpecifier produce() {
1811  public boolean hasNext() {
1825  public ImageTypeSpecifier next() {
1835  public void remove() {


*JPEGImageWriter.java*

Missing @Override annotation:
179 public Void run() {


*PNGImageReader.java*

Missing @Override annotation:
76 public InputStream nextElement() {
86 public boolean hasMoreElements() {

This file has been updated since the time this webrev was created; thus 
the copyright update does not apply.



*WBMPImageReader.java*

This file has a wildcard import:
43 import java.io.*;
Shall we expand it as in BMPImageReader.java?


*WBMPImageWriter.java*

Missing @Override annotation:
137 public boolean canWriteRasters() {


Regards,
Alexey


On 30 Jul 2020, at 07:10, Kumar Abhishek  wrote:

Hi Dmitry,

I have updated the year in the copyright section for the modified file.
Please find the updated Webrev:-
http://cr.openjdk.java.net/~jdv/8200281/webrev.03/


Thanks,
Abhishek



-Original Message-
From: Alexey Ivanov
Sent: Saturday, July 25, 2020 2:38 AM
To: Kumar Abhishek 
Cc: Philip Race ; 2d-dev
<2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override
annotations in ImageIO plugins

Hi Abhishek,



So the patch is incomplete.
Please verify you add @Override annotation to all overridden methods in these 
classes.


Regards,
Alexey


Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-30 Thread Dmitry Markov
Looks good to me.

Regards,
Dmitry

> On 30 Jul 2020, at 07:10, Kumar Abhishek  wrote:
> 
> Hi Dmitry,
> 
> I have updated the year in the copyright section for the modified file.
> Please find the updated Webrev:-
> http://cr.openjdk.java.net/~jdv/8200281/webrev.03/
> 
> 
> Thanks,
> Abhishek
> -Original Message-
> From: Dmitry Markov 
> Sent: Wednesday, July 29, 2020 11:45 PM
> To: Kumar Abhishek 
> Cc: Alexey Ivanov ; Philip Race 
> ; 2d-dev <2d-dev@openjdk.java.net>
> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
> annotations in ImageIO plugins
> 
> Hi Abhishek,
> 
> Could you update the year in the copyright section for the modified files, 
> please?
> 
> Regards,
> Dmitry
> 
>> On 29 Jul 2020, at 11:43, Kumar Abhishek  wrote:
>> 
>> Hi Alexey/Dmitry,
>> 
>> Please find the updated Webrev.
>> http://cr.openjdk.java.net/~jdv/8200281/webrev.02/
>> 
>> I have added the missed annotation.
>> 
>> Thanks,
>> Abhishek
>> -Original Message-----
>> From: Alexey Ivanov
>> Sent: Saturday, July 25, 2020 2:38 AM
>> To: Kumar Abhishek 
>> Cc: Philip Race ; 2d-dev 
>> <2d-dev@openjdk.java.net>
>> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
>> annotations in ImageIO plugins
>> 
>> Hi Abhishek,
>> 
>> *JPEGImageWriter.java*
>> 
>> 240 public IIOMetadata convertStreamMetadata(IIOMetadata inData,
>> 
>> 255 public IIOMetadata
>> 256 convertImageMetadata(IIOMetadata inData,
>> 
>> 1751 public synchronized void dispose() {
>> 
>> These methods are missed: no @Override annotation. In the last case, the 
>> method implements an interface rather than overrides a method from a super 
>> class, yet the @Override annotation is usually added.
>> 
>> *BMPImageReader.java*
>> 1937 public void imageProgress(ImageReader source,
>> 1945 public void imageUpdate(ImageReader source,
>> 1956 public void passComplete(ImageReader source,
>> 
>> 
>> So the patch is incomplete.
>> Please verify you add @Override annotation to all overridden methods in 
>> these classes.
>> 
>> 
>> Regards,
>> Alexey
>> 
>> On 24/07/2020 18:59, Philip Race wrote:
>>> This is fine. Approved.
>>> 
>>> -phil.
>>> 
>>> On 7/24/20, 3:08 AM, Kumar Abhishek wrote:
>>>> 
>>>> Hi Phil,
>>>> 
>>>> This bug was originally only for JPEG plugin though I have verified 
>>>> the changes for other plugins as well.
>>>> 
>>>> Do you want me to divide the change for different plugins and create 
>>>> separate bugs or the current approach is fine?
>>>> 
>>>> Please find the updated webrev with superfluous comments removed :
>>>> 
>>>> http://cr.openjdk.java.net/~jdv/8200281/webrev.01/
>>>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.01/>
>>>> 
>>>> Thanks,
>>>> 
>>>> Abhishek
>>>> 
>>>> *From:*Philip Race
>>>> *Sent:* Thursday, July 23, 2020 10:37 PM
>>>> *To:* Kumar Abhishek 
>>>> *Cc:* 2d-dev@openjdk.java.net
>>>> *Subject:* Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
>>>> annotations in ImageIO plugins
>>>> 
>>>> 
>>>> 
>>>> On 7/23/20, 5:20 AM, Kumar Abhishek wrote:
>>>> 
>>>>   Hello, Please review this small change for JDK-16 .
>>>> 
>>>>   This is a clean up task to verify and add missing annotations in
>>>>   ImageIO plugins
>>>> 
>>>> 
>>>> They are missing in part because most of these classes were added in
>>>> 1.4 and
>>>> annotations were introduced in 1.5. So I am not sure how much 
>>>> retrofitting we should do along these lines. If applied widely it 
>>>> could just make backports painful when patches will not apply.
>>>> 
>>>> 
>>>> /** Overrides the method defined in the superclass. */
>>>> +@Override
>>>> 
>>>> The comment is now superflous so I suggest to remove it in the 
>>>> couple of places it is present.
>>>> 
>>>> -phil.
>>>> 
>>>>   Verified and added annotations for all the Writer and Reader
>>>>   implementation under
>>>>   src/java.desktop/share/classes/com/sun/imageio/plugins/
>>>> 
>>>>   Bug/webrev :
>>>> 
>>>>   https://bugs.openjdk.java.net/browse/JDK-8200281
>>>> 
>>>>   http://cr.openjdk.java.net/~jdv/8200281/webrev.00/  
>>>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>   Thanks, Abhishek
>>>> 
>> 
> 



Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-29 Thread Kumar Abhishek
Hi Dmitry,

I have updated the year in the copyright section for the modified file.
Please find the updated Webrev:-
http://cr.openjdk.java.net/~jdv/8200281/webrev.03/


Thanks,
Abhishek
-Original Message-
From: Dmitry Markov 
Sent: Wednesday, July 29, 2020 11:45 PM
To: Kumar Abhishek 
Cc: Alexey Ivanov ; Philip Race 
; 2d-dev <2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

Hi Abhishek,

Could you update the year in the copyright section for the modified files, 
please?

Regards,
Dmitry

> On 29 Jul 2020, at 11:43, Kumar Abhishek  wrote:
> 
> Hi Alexey/Dmitry,
> 
> Please find the updated Webrev.
> http://cr.openjdk.java.net/~jdv/8200281/webrev.02/
> 
> I have added the missed annotation.
> 
> Thanks,
> Abhishek
> -Original Message-
> From: Alexey Ivanov
> Sent: Saturday, July 25, 2020 2:38 AM
> To: Kumar Abhishek 
> Cc: Philip Race ; 2d-dev 
> <2d-dev@openjdk.java.net>
> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
> annotations in ImageIO plugins
> 
> Hi Abhishek,
> 
> *JPEGImageWriter.java*
> 
> 240 public IIOMetadata convertStreamMetadata(IIOMetadata inData,
> 
> 255 public IIOMetadata
> 256 convertImageMetadata(IIOMetadata inData,
> 
> 1751 public synchronized void dispose() {
> 
> These methods are missed: no @Override annotation. In the last case, the 
> method implements an interface rather than overrides a method from a super 
> class, yet the @Override annotation is usually added.
> 
> *BMPImageReader.java*
> 1937 public void imageProgress(ImageReader source,
> 1945 public void imageUpdate(ImageReader source,
> 1956 public void passComplete(ImageReader source,
> 
> 
> So the patch is incomplete.
> Please verify you add @Override annotation to all overridden methods in these 
> classes.
> 
> 
> Regards,
> Alexey
> 
> On 24/07/2020 18:59, Philip Race wrote:
>> This is fine. Approved.
>> 
>> -phil.
>> 
>> On 7/24/20, 3:08 AM, Kumar Abhishek wrote:
>>> 
>>> Hi Phil,
>>> 
>>> This bug was originally only for JPEG plugin though I have verified 
>>> the changes for other plugins as well.
>>> 
>>> Do you want me to divide the change for different plugins and create 
>>> separate bugs or the current approach is fine?
>>> 
>>> Please find the updated webrev with superfluous comments removed :
>>> 
>>> http://cr.openjdk.java.net/~jdv/8200281/webrev.01/
>>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.01/>
>>> 
>>> Thanks,
>>> 
>>> Abhishek
>>> 
>>> *From:*Philip Race
>>> *Sent:* Thursday, July 23, 2020 10:37 PM
>>> *To:* Kumar Abhishek 
>>> *Cc:* 2d-dev@openjdk.java.net
>>> *Subject:* Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
>>> annotations in ImageIO plugins
>>> 
>>> 
>>> 
>>> On 7/23/20, 5:20 AM, Kumar Abhishek wrote:
>>> 
>>>Hello, Please review this small change for JDK-16 .
>>> 
>>>This is a clean up task to verify and add missing annotations in
>>>ImageIO plugins
>>> 
>>> 
>>> They are missing in part because most of these classes were added in
>>> 1.4 and
>>> annotations were introduced in 1.5. So I am not sure how much 
>>> retrofitting we should do along these lines. If applied widely it 
>>> could just make backports painful when patches will not apply.
>>> 
>>> 
>>>  /** Overrides the method defined in the superclass. */
>>> +@Override
>>> 
>>> The comment is now superflous so I suggest to remove it in the 
>>> couple of places it is present.
>>> 
>>> -phil.
>>> 
>>>Verified and added annotations for all the Writer and Reader
>>>implementation under
>>>src/java.desktop/share/classes/com/sun/imageio/plugins/
>>> 
>>>Bug/webrev :
>>> 
>>>https://bugs.openjdk.java.net/browse/JDK-8200281
>>> 
>>>http://cr.openjdk.java.net/~jdv/8200281/webrev.00/  
>>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>>Thanks, Abhishek
>>> 
> 



Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-29 Thread Dmitry Markov
Hi Abhishek,

Could you update the year in the copyright section for the modified files, 
please?

Regards,
Dmitry

> On 29 Jul 2020, at 11:43, Kumar Abhishek  wrote:
> 
> Hi Alexey/Dmitry,
> 
> Please find the updated Webrev.
> http://cr.openjdk.java.net/~jdv/8200281/webrev.02/
> 
> I have added the missed annotation.
> 
> Thanks,
> Abhishek
> -Original Message-
> From: Alexey Ivanov 
> Sent: Saturday, July 25, 2020 2:38 AM
> To: Kumar Abhishek 
> Cc: Philip Race ; 2d-dev <2d-dev@openjdk.java.net>
> Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
> annotations in ImageIO plugins
> 
> Hi Abhishek,
> 
> *JPEGImageWriter.java*
> 
> 240 public IIOMetadata convertStreamMetadata(IIOMetadata inData,
> 
> 255 public IIOMetadata
> 256 convertImageMetadata(IIOMetadata inData,
> 
> 1751 public synchronized void dispose() {
> 
> These methods are missed: no @Override annotation. In the last case, the 
> method implements an interface rather than overrides a method from a super 
> class, yet the @Override annotation is usually added.
> 
> *BMPImageReader.java*
> 1937 public void imageProgress(ImageReader source,
> 1945 public void imageUpdate(ImageReader source,
> 1956 public void passComplete(ImageReader source,
> 
> 
> So the patch is incomplete.
> Please verify you add @Override annotation to all overridden methods in these 
> classes.
> 
> 
> Regards,
> Alexey
> 
> On 24/07/2020 18:59, Philip Race wrote:
>> This is fine. Approved.
>> 
>> -phil.
>> 
>> On 7/24/20, 3:08 AM, Kumar Abhishek wrote:
>>> 
>>> Hi Phil,
>>> 
>>> This bug was originally only for JPEG plugin though I have verified 
>>> the changes for other plugins as well.
>>> 
>>> Do you want me to divide the change for different plugins and create 
>>> separate bugs or the current approach is fine?
>>> 
>>> Please find the updated webrev with superfluous comments removed :
>>> 
>>> http://cr.openjdk.java.net/~jdv/8200281/webrev.01/ 
>>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.01/>
>>> 
>>> Thanks,
>>> 
>>> Abhishek
>>> 
>>> *From:*Philip Race
>>> *Sent:* Thursday, July 23, 2020 10:37 PM
>>> *To:* Kumar Abhishek 
>>> *Cc:* 2d-dev@openjdk.java.net
>>> *Subject:* Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
>>> annotations in ImageIO plugins
>>> 
>>> 
>>> 
>>> On 7/23/20, 5:20 AM, Kumar Abhishek wrote:
>>> 
>>>Hello, Please review this small change for JDK-16 .
>>> 
>>>This is a clean up task to verify and add missing annotations in
>>>ImageIO plugins
>>> 
>>> 
>>> They are missing in part because most of these classes were added in 
>>> 1.4 and
>>> annotations were introduced in 1.5. So I am not sure how much 
>>> retrofitting we
>>> should do along these lines. If applied widely it could just make 
>>> backports painful
>>> when patches will not apply.
>>> 
>>> 
>>>  /** Overrides the method defined in the superclass. */
>>> +@Override
>>> 
>>> The comment is now superflous so I suggest to remove it in the couple 
>>> of places it is present.
>>> 
>>> -phil.
>>> 
>>>Verified and added annotations for all the Writer and Reader
>>>implementation under
>>>src/java.desktop/share/classes/com/sun/imageio/plugins/
>>> 
>>>Bug/webrev :
>>> 
>>>https://bugs.openjdk.java.net/browse/JDK-8200281
>>> 
>>>http://cr.openjdk.java.net/~jdv/8200281/webrev.00/  
>>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/>  
>>> 
>>> 
>>> 
>>> 
>>> 
>>>Thanks, Abhishek
>>> 
> 



Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-29 Thread Kumar Abhishek
Hi Alexey/Dmitry,

Please find the updated Webrev.
http://cr.openjdk.java.net/~jdv/8200281/webrev.02/

I have added the missed annotation.

Thanks,
Abhishek
-Original Message-
From: Alexey Ivanov 
Sent: Saturday, July 25, 2020 2:38 AM
To: Kumar Abhishek 
Cc: Philip Race ; 2d-dev <2d-dev@openjdk.java.net>
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

Hi Abhishek,

*JPEGImageWriter.java*

240 public IIOMetadata convertStreamMetadata(IIOMetadata inData,

255 public IIOMetadata
256 convertImageMetadata(IIOMetadata inData,

1751 public synchronized void dispose() {

These methods are missed: no @Override annotation. In the last case, the method 
implements an interface rather than overrides a method from a super class, yet 
the @Override annotation is usually added.

*BMPImageReader.java*
1937 public void imageProgress(ImageReader source,
1945 public void imageUpdate(ImageReader source,
1956 public void passComplete(ImageReader source,


So the patch is incomplete.
Please verify you add @Override annotation to all overridden methods in these 
classes.


Regards,
Alexey

On 24/07/2020 18:59, Philip Race wrote:
> This is fine. Approved.
>
> -phil.
>
> On 7/24/20, 3:08 AM, Kumar Abhishek wrote:
>>
>> Hi Phil,
>>
>> This bug was originally only for JPEG plugin though I have verified 
>> the changes for other plugins as well.
>>
>> Do you want me to divide the change for different plugins and create 
>> separate bugs or the current approach is fine?
>>
>> Please find the updated webrev with superfluous comments removed :
>>
>> http://cr.openjdk.java.net/~jdv/8200281/webrev.01/ 
>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.01/>
>>
>> Thanks,
>>
>> Abhishek
>>
>> *From:*Philip Race
>> *Sent:* Thursday, July 23, 2020 10:37 PM
>> *To:* Kumar Abhishek 
>> *Cc:* 2d-dev@openjdk.java.net
>> *Subject:* Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
>> annotations in ImageIO plugins
>>
>>
>>
>> On 7/23/20, 5:20 AM, Kumar Abhishek wrote:
>>
>> Hello, Please review this small change for JDK-16 .
>>
>> This is a clean up task to verify and add missing annotations in
>> ImageIO plugins
>>
>>
>> They are missing in part because most of these classes were added in 
>> 1.4 and
>> annotations were introduced in 1.5. So I am not sure how much 
>> retrofitting we
>> should do along these lines. If applied widely it could just make 
>> backports painful
>> when patches will not apply.
>>
>>
>>   /** Overrides the method defined in the superclass. */
>> +    @Override
>>
>> The comment is now superflous so I suggest to remove it in the couple 
>> of places it is present.
>>
>> -phil.
>>
>> Verified and added annotations for all the Writer and Reader
>> implementation under
>> src/java.desktop/share/classes/com/sun/imageio/plugins/
>>
>> Bug/webrev :
>>
>> https://bugs.openjdk.java.net/browse/JDK-8200281
>>
>> http://cr.openjdk.java.net/~jdv/8200281/webrev.00/  
>> <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/>  
>>
>>   
>>
>>   
>>
>> Thanks, Abhishek
>>



Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-24 Thread Alexey Ivanov

Hi Abhishek,

*JPEGImageWriter.java*

240 public IIOMetadata convertStreamMetadata(IIOMetadata inData,

255 public IIOMetadata
256 convertImageMetadata(IIOMetadata inData,

1751 public synchronized void dispose() {

These methods are missed: no @Override annotation. In the last case, the 
method implements an interface rather than overrides a method from a 
super class, yet the @Override annotation is usually added.


*BMPImageReader.java*
1937 public void imageProgress(ImageReader source,
1945 public void imageUpdate(ImageReader source,
1956 public void passComplete(ImageReader source,


So the patch is incomplete.
Please verify you add @Override annotation to all overridden methods in 
these classes.



Regards,
Alexey

On 24/07/2020 18:59, Philip Race wrote:

This is fine. Approved.

-phil.

On 7/24/20, 3:08 AM, Kumar Abhishek wrote:


Hi Phil,

This bug was originally only for JPEG plugin though I have verified 
the changes for other plugins as well.


Do you want me to divide the change for different plugins and create 
separate bugs or the current approach is fine?


Please find the updated webrev with superfluous comments removed :

http://cr.openjdk.java.net/~jdv/8200281/webrev.01/ 
<http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.01/>


Thanks,

Abhishek

*From:*Philip Race
*Sent:* Thursday, July 23, 2020 10:37 PM
*To:* Kumar Abhishek 
*Cc:* 2d-dev@openjdk.java.net
*Subject:* Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
annotations in ImageIO plugins




On 7/23/20, 5:20 AM, Kumar Abhishek wrote:

Hello, Please review this small change for JDK-16 .

This is a clean up task to verify and add missing annotations in
ImageIO plugins


They are missing in part because most of these classes were added in 
1.4 and
annotations were introduced in 1.5. So I am not sure how much 
retrofitting we
should do along these lines. If applied widely it could just make 
backports painful

when patches will not apply.


  /** Overrides the method defined in the superclass. */
+    @Override

The comment is now superflous so I suggest to remove it in the couple 
of places it is present.


-phil.

Verified and added annotations for all the Writer and Reader
implementation under
src/java.desktop/share/classes/com/sun/imageio/plugins/

Bug/webrev :

https://bugs.openjdk.java.net/browse/JDK-8200281

http://cr.openjdk.java.net/~jdv/8200281/webrev.00/  <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/>  

  

  


Thanks, Abhishek





Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-24 Thread Philip Race

This is fine. Approved.

-phil.

On 7/24/20, 3:08 AM, Kumar Abhishek wrote:


Hi Phil,

This bug was originally only for JPEG plugin though I have verified 
the changes for other plugins as well.


Do you want me to divide the change for different plugins and create 
separate bugs or the current approach is fine?


Please find the updated webrev with superfluous comments removed :

http://cr.openjdk.java.net/~jdv/8200281/webrev.01/ 
<http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.01/>


Thanks,

Abhishek

*From:*Philip Race
*Sent:* Thursday, July 23, 2020 10:37 PM
*To:* Kumar Abhishek 
*Cc:* 2d-dev@openjdk.java.net
*Subject:* Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override 
annotations in ImageIO plugins




On 7/23/20, 5:20 AM, Kumar Abhishek wrote:

Hello, Please review this small change for JDK-16 .

  


This is a clean up task to verify and add missing annotations in ImageIO 
plugins


They are missing in part because most of these classes were added in 
1.4 and
annotations were introduced in 1.5. So I am not sure how much 
retrofitting we
should do along these lines. If applied widely it could just make 
backports painful

when patches will not apply.


  /** Overrides the method defined in the superclass. */
+@Override
  

The comment is now superflous so I suggest to remove it in the couple 
of places it is present.


-phil.

  


Verified and added annotations for all the Writer and Reader implementation 
under src/java.desktop/share/classes/com/sun/imageio/plugins/

  


Bug/webrev :

  


https://bugs.openjdk.java.net/browse/JDK-8200281

http://cr.openjdk.java.net/~jdv/8200281/webrev.00/  <http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/>  

  

  


Thanks, Abhishek



Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-24 Thread Kumar Abhishek
 

Hi Phil,

 

This bug was originally only for JPEG plugin though I have verified the changes 
for other plugins as well.

Do you want me to divide the change for different plugins and create separate 
bugs or the current approach is fine?

 

Please find the updated webrev with superfluous comments removed :

http://cr.openjdk.java.net/~jdv/8200281/webrev.01/ 

 

 

Thanks,

Abhishek

From: Philip Race 
Sent: Thursday, July 23, 2020 10:37 PM
To: Kumar Abhishek 
Cc: 2d-dev@openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations 
in ImageIO plugins

 



On 7/23/20, 5:20 AM, Kumar Abhishek wrote: 

 

Hello, Please review this small change for JDK-16 .
 
This is a clean up task to verify and add missing annotations in ImageIO plugins


They are missing in part because most of these classes were added in 1.4 and
annotations were introduced in 1.5. So I am not sure how much retrofitting we
should do along these lines. If applied widely it could just make backports 
painful
when patches will not apply.




 /** Overrides the method defined in the superclass. */
+@Override
 

The comment is now superflous so I suggest to remove it in the couple of places 
it is present.

-phil.



 
Verified and added annotations for all the Writer and Reader implementation 
under src/java.desktop/share/classes/com/sun/imageio/plugins/
 
Bug/webrev :
 
https://bugs.openjdk.java.net/browse/JDK-8200281
HYPERLINK 
"http://cr.openjdk.java.net/%7Ejdv/8200281/webrev.00/"http://cr.openjdk.java.net/~jdv/8200281/webrev.00/
 
 
 
Thanks, Abhishek

 


Re: [OpenJDK 2D-Dev] RFR : 8200281: Add missing @Override annotations in ImageIO plugins

2020-07-23 Thread Philip Race



On 7/23/20, 5:20 AM, Kumar Abhishek wrote:


Hello, Please review this small change for JDK-16 .
  
This is a clean up task to verify and add missing annotations in ImageIO plugins


They are missing in part because most of these classes were added in 1.4 and
annotations were introduced in 1.5. So I am not sure how much 
retrofitting we
should do along these lines. If applied widely it could just make 
backports painful

when patches will not apply.

 /** Overrides the method defined in the superclass. */
+@Override

The comment is now superflous so I suggest to remove it in the couple of 
places it is present.


-phil.
  
Verified and added annotations for all the Writer and Reader implementation under src/java.desktop/share/classes/com/sun/imageio/plugins/
  
Bug/webrev :
  
https://bugs.openjdk.java.net/browse/JDK-8200281
http://cr.openjdk.java.net/~jdv/8200281/webrev.00/    
  
  
Thanks, Abhishek