Community
Participate
Working Groups
In Printer.checkNull(data) the 2 lines: data.driver = defaultPrinter.driver; data.name = defaultPrinter.name; destructively modify the PrinterData that is passed in. This should not happen. The only way to avoid this is to have a copy/clone method in PrinterData, and keep a copy of the data that is passed in to the Printer constructor.
See also bug 297957, which requests a public copy method. (But not a "clone" method - see bug 4740). See also bug 315932, for more background, and a case in StyledText that was failing because Printer does not keep a copy of the user's PrinterData. All Printer/PrintDialog javadoc should be reviewed and fixed up if necessary, to explicitly state whether a copy of the PrinterData is used or not.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.