Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream

2016-03-29 Thread Jayathirth D V
Hi Phil, Yes I agree with that. This test case is only for those read() and write() functions which tend to use createImageXXXStream() and not for those which get stream directly as part of argument and follow the spec. Thanks for your inputs. -Jay From: Phil Race Sent: Tuesday,

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Philip Race
> One comes from the SampleModel, the other comes from the DataBuffer. In the other methods that is true but not in this one. This method creates the SampleModel using the type of the DataBuffer. The webrev diff is insufficient to make this apparent. -phil. On 3/29/16, 7:17 PM, Jim Graham

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
One comes from the SampleModel, the other comes from the DataBuffer. The reason to check them both is to make sure they agree. There is no "it must be DataBuffer.TYPE_BYTE" here, there is only "it *should* be DataBuffer.TYPE_BYTE" and that warrants a test and a fallback to the generic

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
Raster.java, line 742: This branch of the switch statement instantiates a SWR which doesn't have a specific buffer type. It could be replaced with just "break;" and let the code after the switch create the raster (it can't be deleted from the switch statement because the default would throw

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
Ah, yes, now I see it. I was combing through the various classes in java/awt/image that *are* public to do some research while I was reading the code review and somehow thought that the classes being modified were in the same directory/package. I now see that all of the modified constructors

Re: [OpenJDK 2D-Dev] [2D-Dev] Review Request: JDK-8015070: Antialiased text on translucent backgrounds gets bright artifacts

2016-03-29 Thread Jim Graham
Hi Prahalad, This latest version looks like it should produce correct answers. I'd like to see benchmark results on more platforms, particularly Windows since the different compilers may optimize these things differently. Also, you didn't mention what data set you used for benchmarking. I'd

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Sergey Bylokhov
On 29.03.16 23:19, Jim Graham wrote: This sounded like such a great idea that I don't think we realized the one obvious reason we can't do this... We should take into account that this classes in sun/awt/image and is not accessible on old jdk when the securitymanager is enabled, and will be

Re: [OpenJDK 2D-Dev] [9] Review-request for 6353518: Creation of a WritableRaster with a custom DataBuffer causes erroneous Exception

2016-03-29 Thread Jim Graham
This sounded like such a great idea that I don't think we realized the one obvious reason we can't do this... You are talking about changing the method signatures on existing public constructors. While it might be nice to have had them typed from the get-go, I don't think we can change them

Re: [OpenJDK 2D-Dev] [9] RFR JDK-8042713, , [macosx] Print dialog does not update attribute set with page range

2016-03-29 Thread Phil Race
Like the related fix passing down page ranges to the dialog this looks reasonable but I have not had time to apply the patch and test it. You should test the combination of this fix + that for 8061258 before pushing .. -phil. On 03/22/2016 04:25 AM, prasanta sadhukhan wrote: Hi Phil, I

Re: [OpenJDK 2D-Dev] [9] RFR: JDK-8061258, , [macosx] PrinterJob's native Print Dialog does not reflect specified Copies or Page Ranges

2016-03-29 Thread Phil Race
Hi, You are calling these unconditionally : 387 jint minPage = JNFCallIntMethod(env, srcPrinterJob, jm_getMinPage); 388 jint maxPage = JNFCallIntMethod(env, srcPrinterJob, jm_getMaxPage); But it seems they are only used/needed in the else {..} Other than that it looks reasonable but

[OpenJDK 2D-Dev] RFR 8149028: [TEST] add test for TIFFDirectory

2016-03-29 Thread Alexander Stepanov
Please see the updated webrev: http://cr.openjdk.java.net/~avstepan/8149028/webrev.01/ (one more test was added). Thanks, Alexander On 3/25/2016 6:46 PM, Alexander Stepanov wrote: Hello, Could you please review the following fix http://cr.openjdk.java.net/~avstepan/8149028/webrev.00/ for

Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream

2016-03-29 Thread Phil Race
This is OK but you ought to remember that read() and write() only HAPPEN to use createImageXXXStream(). They could get the stream in some other way and still be a spec. compliant implementation. -phil. On 03/29/2016 02:27 AM, Jayathirth D V wrote: Hi Prasanta, Actually returns null in test

Re: [OpenJDK 2D-Dev] CFV: New 2D Group Member: Alexander Scherbatiy

2016-03-29 Thread Alexander Potochkin
Vote: yes On 3/18/2016 01:49, Philip Race wrote: I hereby nominate Alexander Scherbatiy to membership in the 2D group. Alexander Scherbatiy is a current member of the Swing group and has contributed almost 200 changesets to OpenJDK :-

Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream

2016-03-29 Thread Sergey Bylokhov
I am not sure what is the reason of this code? 1546 try { 1547 output.delete(); 1548 stream = createImageOutputStream(output); 1549 } catch (IOException e) { 1550 throw e; 1551 } On 29.03.16 1:12, Philip Race wrote: This all looks fine

Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream

2016-03-29 Thread prasanta sadhukhan
Looks ok. Regards Prasanta On 3/29/2016 2:57 PM, Jayathirth D V wrote: Hi Prasanta, Actually returns null in test description is for createImageXXXStream() and not for read() and write() functions. But for more clarity I have added why we catch IOException also in test description.

Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream

2016-03-29 Thread Jayathirth D V
Hi Prasanta, Actually returns null in test description is for createImageXXXStream() and not for read() and write() functions. But for more clarity I have added why we catch IOException also in test description. Please review the updated webrev:

Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream

2016-03-29 Thread prasanta sadhukhan
+1. Looks ok to me. Only thing is that whether the test summary is appropriate " Test verifies that when createImageInputStream() or 28 * createImageOutputStream() returns null while read or write," Should it not be "verifies whether ...throws appropriate exception"? Regards