[OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-15 Thread prasanta sadhukhan
Hi All, Bug: https://bugs.openjdk.java.net/browse/JDK-6218397 The issue was if the linux disk is full and we are trying to "print to file" then PrinterException is not thrown and a 0 byte file is created. Although I am not able to reproduce this behaviour, because when I make my disk full an

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-15 Thread Philip Race
If this is executed on Windows (shared Postscript stream printer could do this) then since the output stream is still open I expect the delete will fail. Attempt to close the open stream first (in a try .. catch I suppose). -phil. On 6/15/16, 3:25 AM, prasanta sadhukhan wrote: Hi All, Bug: h

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-16 Thread prasanta sadhukhan
Modified webrev to close output stream. http://cr.openjdk.java.net/~psadhukhan/6218397/webrev.01/ Regards Prasanta On 6/15/2016 9:52 PM, Philip Race wrote: If this is executed on Windows (shared Postscript stream printer could do this) then since the output stream is still open I expect the de

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-19 Thread prasanta sadhukhan
Hi Phil,All, Added file delete in another case where we throw PrinterException. http://cr.openjdk.java.net/~psadhukhan/6218397/webrev.02/ Regards Prasanta On 6/16/2016 1:40 PM, prasanta sadhukhan wrote: Modified webrev to close output stream. http://cr.openjdk.java.net/~psadhukhan/6218397/web

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-23 Thread Prasanta Sadhukhan
Hi Phil, All, Based on the offline discussion, I added the case when disk gets filled while writing to the file. Since PrintStream does not throw IOException, I added check for checkError() to do the corresponding error handling. I added it after flush() as that is where the stream will be wri

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-29 Thread Philip Race
if (f.exists()) f.delete(); should use { ... } for the body - 2 cases of this one in each of the modified files. Other than that OK. I don't need to see an updated webrev so long as you make those syntactic changes. -phil On 6/23/16, 3:40 AM, Prasanta Sadhukhan wrote: Hi Phil, All, Based

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-29 Thread Prasanta Sadhukhan
Thanks Phil. @Jay, can you please review this updated webrev http://cr.openjdk.java.net/~psadhukhan/6218397/webrev.04/ that takes care of this syntactic changes? Regards Prasanta On 6/29/2016 11:01 PM, Philip Race wrote: if (f.exists()) f.delete(); should use { ... } for the body - 2 cases of

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-30 Thread Jayathirth D V
ror()) {     abortDoc(); throw new PrinterException("Error while writing to file"); }   Thanks, Jay From: Prasanta Sadhukhan Sent: Thursday, June 30, 2016 10:35 AM To: Philip Race; Jayathirth D V Cc: 2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-30 Thread Jayathirth D V
@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created   Hi Prasanta,   I think we can use same abortDoc() functionality in “endDoc() -> mPSStream.checkError()” case as it is used in startDoc(). In abort

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-30 Thread Prasanta Sadhukhan
sday, June 30, 2016 10:35 AM *To:* Philip Race; Jayathirth D V *Cc:* 2d-dev@openjdk.java.net *Subject:* Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created Thanks Phil. @Jay, can you please review this updated

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created

2016-06-30 Thread Jayathirth D V
s, Jay From: Prasanta Sadhukhan Sent: Thursday, June 30, 2016 10:35 AM To: Philip Race; Jayathirth D V Cc: HYPERLINK "mailto:2d-dev@openjdk.java.net"2d-dev@openjdk.java.net Subject: Re: [OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file canno