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

2016-04-05 Thread Sergey Bylokhov
:05 PM To: Jayathirth D V Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream On 30.03.16 9:48, Jayathirth D V wrote: Thanks for pointing it out. It looks like redundant try-catch block

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

2016-04-05 Thread Jayathirth D V
: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream On 30.03.16 9:48, Jayathirth D V wrote: > Thanks for pointing it out. It looks like redundant try-catch block. There is small code clean up is possible after your lat

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

2016-04-05 Thread Sergey Bylokhov
rth D V Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream I am not sure what is the reason of this code? 1546 try { 1547 output.delete(); 1548

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
om: Sergey Bylokhov Sent: Tuesday, March 29, 2016 6:11 PM To: Philip Race; Jayathirth D V Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream I am not sure what is the reason of this

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
, March 29, 2016 10:38 PM To: Jayathirth D V Cc: Prasanta Sadhukhan; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream This is OK but you ought to remember that read() and write() only HAPPEN to

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
jdv/8044289/webrev.05/> Thanks, Jay *From:*prasanta sadhukhan *Sent:* Tuesday, March 29, 2016 2:21 PM *To:* Jayathirth D V *Cc:* Philip Race; 2d-dev@openjdk.java.net *Subject:* Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for strea

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
enjdk.java.net <mailto:2d-dev@openjdk.java.net> *Subject:* Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream I don't think this is ready and we need to discuss whether to rework it. In general I think I prefer II

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
t:* Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream +1. Looks ok to me. Only thing is that whether the test summary is appropriate " Test verifies that when createImageInputStream() or 28 * createImageO

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
/webrev.05/ Thanks, Jay From: prasanta sadhukhan Sent: Tuesday, March 29, 2016 2:21 PM To: Jayathirth D V Cc: Philip Race; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream +1

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
:* Sergey Bylokhov; 2d-dev@openjdk.java.net *Subject:* RE: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream Hi Phil, We can change the code to something like : 1522 * @return false if no appropriate writer is found or 1523 *

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

2016-03-28 Thread Philip Race
Thanks, Jay *From:*Philip Race *Sent:* Thursday, March 24, 2016 5:10 AM *To:* Jayathirth D V *Cc:* Sergey Bylokhov; 2d-dev@openjdk.java.net <mailto:2d-dev@openjdk.java.net> *Subject:* Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled

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

2016-03-28 Thread Jayathirth D V
Subject: RE: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream Hi Phil, We can change the code to something like : 1522 * @return false if no appropriate writer is found or 1523 * when needed stream is null

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

2016-03-24 Thread Jayathirth D V
rch 24, 2016 5:10 AM To: Jayathirth D V Cc: Sergey Bylokhov; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream I don't think this is ready and we need to discuss whether to rework it. In

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

2016-03-23 Thread Philip Race
jdv/8044289/webrev.03/ Thanks, Jay -Original Message- From: Sergey Bylokhov Sent: Tuesday, March 22, 2016 7:39 AM To: Jayathirth D V; Philip Race Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled proper

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

2016-03-22 Thread Jayathirth D V
>> http://cr.openjdk.java.net/~jdv/8044289/webrev.02/ >> >> Thanks, >> Jay >> >> -----Original Message----- >> From: Jayathirth D V >> Sent: Friday, March 18, 2016 2:23 PM >> To: Sergey Bylokhov >> Cc: 2d-dev@openjdk.java.net; Ph

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

2016-03-22 Thread Sergey Bylokhov
: Tuesday, March 22, 2016 7:39 AM To: Jayathirth D V; Philip Race Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream Hi, Jay. Since we decided to update the specification we get an additional

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

2016-03-22 Thread Jayathirth D V
day, March 18, 2016 2:23 PM > To: Sergey Bylokhov > Cc: 2d-dev@openjdk.java.net; Philip Race > Subject: RE: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In > ImageIO.read() and write() NPE is not handled properly for stream > > Hi Sergey, > > Thanks for your inputs. > &

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

2016-03-21 Thread Sergey Bylokhov
able to create required stream. Thanks, Jay -Original Message- From: Sergey Bylokhov Sent: Thursday, March 17, 2016 7:27 PM To: Phil Race Cc: Jayathirth D V; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not hand

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

2016-03-21 Thread Jayathirth D V
@openjdk.java.net; Philip Race Subject: RE: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream Hi Sergey, Thanks for your inputs. Indeed all the null values returned by createImageInputStream() and createImageInputStream() are valid only. I

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

2016-03-20 Thread Phil Race
I don't think that is the actual reason here - it seems likely that there was some kind of internal error or bad SPI causing this. So throwing an exception seems more appropriate. And also the bug was originally solely about write(..). -phil. On 03/16/2016 01:35 PM, Sergey Bylokhov wrote: As fa

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

2016-03-19 Thread Jayathirth D V
will indicate that we are not able to create required stream. Thanks, Jay -Original Message- From: Sergey Bylokhov Sent: Thursday, March 17, 2016 7:27 PM To: Phil Race Cc: Jayathirth D V; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO

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

2016-03-19 Thread Philip Race
The test writes out into "test.src". I believe that you should treat that as a "read-only" location. Write to a tempfile (File.createTempFile()) or TESTCLASSES. -phil. On 3/15/16, 10:50 PM, Jayathirth D V wrote: Hi Phil,All _Please review the following fix in JDK9:_ __ Bug : https://bugs.op

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

2016-03-19 Thread Jayathirth D V
Hi Phil, Thanks for the review. I have made following changes : 1) I am using File.createTempFile() both in case of read and write as a result of which we don't need external .png file which was there in previous webrev. 2) Also since I am using temporary file for

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

2016-03-19 Thread Sergey Bylokhov
As far as I understand the createImageInputStream() returns null is this stream is unsupported by current plugins via spi. Probably the read() method should return null too? /** * Returns a {@code BufferedImage} as the result of decoding * a supplied {@code InputStream} with an {@

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

2016-03-18 Thread Sergey Bylokhov
ssage- From: Sergey Bylokhov Sent: Thursday, March 17, 2016 7:27 PM To: Phil Race Cc: Jayathirth D V; 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream On 17.03.16 0:36, Phil Race wrote: I

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

2016-03-18 Thread Sergey Bylokhov
On 17.03.16 0:36, Phil Race wrote: I don't think that is the actual reason here But the test doing exactly this thing -> deregister all spi => in this case according to specification all related methods(read/write/creatImageInputStream/creatImageOutputStream) should return null or false. -

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

2016-03-18 Thread Jayathirth D V
: Sergey Bylokhov Sent: Friday, March 18, 2016 12:24 AM To: Jayathirth D V Cc: 2d-dev@openjdk.java.net; Philip Race Subject: Re: [OpenJDK 2D-Dev] Review Request for JDK-8044289 : In ImageIO.read() and write() NPE is not handled properly for stream On 17.03.16 21:14, Jayathirth D V wrote: >

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

2016-03-15 Thread Jayathirth D V
Hi Phil,All Please review the following fix in JDK9: Bug : https://bugs.openjdk.java.net/browse/JDK-8044289 Webrev : http://cr.openjdk.java.net/~jdv/8044289/webrev.00/ Issue : When createImageInputStream() or createImageOutputStream returns null in ImageIO.read() or ImageIO.write