[OpenJDK 2D-Dev] [9] RFR JDK-6218397:Printing to file does not throw a PrinterException if the file cannot be created
prasanta sadhukhan
prasanta.sadhukhan at oracle.com
Wed Jun 15 10:25:10 UTC 2016
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 and try to run "java", I get
/Java HotSpot(TM) Server VM warning: Insufficient space for shared
memory file://
// 13783//
//Try using the -Djava.io.tmpdir= option to select an alternate temp
location./
but on investigating this, I see that we are calling f.createNewFile()
in RasterPrinterJob#validateDestination() which creates a new, empty file
but if there is any exception in PSPrinterJob#startDoc this file is not
deleted.
Modified the code to make sure if there is any exception, delete the file.
http://cr.openjdk.java.net/~psadhukhan/6218397/webrev.00/
Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160615/229c8c17/attachment.html>
More information about the 2d-dev
mailing list