<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Phil,<br>
<br>
Thank you very much for review and approval of this fix.<br>
<br>
Thank you,<br>
Anton<br>
<br>
<div class="moz-cite-prefix">On 27/11/2017 23:13, Phil Race wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8aef1ea8-fff0-f800-97f5-039011218d6f@oracle.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Hi,<br>
<br>
<pre><span class="changed">getPageFormatFromAttributes(..) was added to fix some mac specific issues :
</span>
<span class="changed"><a class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8025988" moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8025988</a>
<a class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8025990" moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8025990</a>
which is why it is used only on mac, so I think it is OK to assume
it can be modified to fix a further Mac bug.
So this seems OK.
-phil.
</span></pre>
<br>
<br>
<div class="moz-cite-prefix">On 11/23/2017 08:54 AM, Anton
Litvinov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3dd33e24-c92c-23a7-36b4-e241c12f01eb@oracle.com">Hello
Prasanta and Phil, <br>
<br>
Could you please review the following fix for the bug consisting
in creation of the alternative version of the fix for (<a
class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8167102"
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8167102</a>).
I am writing to you directly, because you reviewed my first fix
for this bug, which then caused the bug (<a
class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8181192"
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8181192</a>)
and was backed out by the fix for JDK-8181192. <br>
<br>
Bug: <a class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8181659"
moz-do-not-send="true">https://bugs.openjdk.java.net/browse/JDK-8181659</a>
<br>
Webrev: <a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Ealitvinov/8181659/jdk10/webrev.00"
moz-do-not-send="true">http://cr.openjdk.java.net/~alitvinov/8181659/jdk10/webrev.00</a>
<br>
<br>
This fix is actually the first version of the fix for
JDK-8167102 with insignificant changes: <br>
- edited comment text; <br>
- 1 redundant check on equality to "null" is removed; <br>
- exclusion of the regression test
"test/jdk/java/awt/print/PageFormat/WrongPaperPrintingTest.java"
developed for JDK-8167102 is cancelled by removal of "@ignore"
tag from the test. <br>
<br>
ADVANTAGES OF THE FIX: <br>
<br>
1)Â The fix is completely OS X specific, because the edited
method
"sun.print.RasterPrinterJob.getPageFormatFromAttributes()" is
invoked only from the OS X native code in file
"src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m".
<br>
<br>
2)Â Corrects the behavior of
"RasterPrinterJob.getPageFormatFromAttributes" method to return
a new "PageFormat" based on corresponding values of the existing
"PageFormat" set by the user through
"java.awt.print.PrinterJob.setPrintable(Printable, PageFormat)",
if the user does not supply "OrientationRequested",
"MediaSizeName", "MediaPrintableArea" attributes during the call
to "PrinterJob.print(PrintRequestAttributeSet)". <br>
<br>
3) Eliminates the possibility of being blocked during the call
"Pageable.getPageFormat(int)", like it was with the previous
version of the fix, because now the fix calls
"getPageFormat(int)" only for "Pageable" of type
"sun.print.OpenBook", which is used by JDK especially, when
"PageFormat" is the same for all pages of the document, when the
user calls "PrinterJob.setPrintable(Printable, PageFormat)". <br>
<br>
I verified that this fix resolves the original bug JDK-8167102
and does not cause the regression JDK-8181192. <br>
<br>
Thank you, <br>
Anton <br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>