Re: [OpenJDK 2D-Dev] [9] RFR JDK-8161264: RasterPrinterJob.updateAttributesWithPageFormat does redundant check

2016-07-20 Thread Prasanta Sadhukhan
No, rest of it is needed as if iw/ih is -ve, then if we do not have this lines if (iw <= 0) iw = (float)(page.getPaper().getWidth()/DPI) - (ix*2); if (ih <= 0) ih = (float)(page.getPaper().getHeight()/DPI) - (iy*2); then MediaPrintable constructor will throw IAE ((ignoring valid ix/iy) and

Re: [OpenJDK 2D-Dev] RFR(S): 8161923: Fix two memory issues.

2016-07-20 Thread Vadim Pakhnushev
Hi Goetz, Maybe instead of increasing the stack size we could move the increment from the assignment to the previous if statement where we check for the overwrite possibility? There are similar code patterns in this file. Also there is almost identical file LigatureSubstProc.cpp which also

Re: [OpenJDK 2D-Dev] [9] RFR JDK-6575247: Banner checkbox in PrinterJob print dialog doesn't work

2016-07-20 Thread Philip Race
In my evaluation of that bug (which was 9 yrs ago so I do not have any memory of it :-)), I note that we first need to check that job-sheets is supported .. you are not doing that .. what happens if we pass an unsupported option ? "-o foobar" ?? This needs testing on Linux, OS X, and Solaris 11.

Re: [OpenJDK 2D-Dev] [9] RFR JDK-8161264: RasterPrinterJob.updateAttributesWithPageFormat does redundant check

2016-07-20 Thread Philip Race
By that logic all the rest of it is unneeded too ... and the original bug was not a bug or the fix was not quite right. This is not adding up to me. -phil On 7/13/16, 1:53 AM, Prasanta Sadhukhan wrote: Hi All, Please review a code cleanup for a redundant code introduced in the below 6601097

Re: [OpenJDK 2D-Dev] RFR(L): 8160974: [TESTBUG] Mark more headful tests with @key headful.

2016-07-20 Thread Lindenmaier, Goetz
Hi Volker, thanks for that thorough review, the wrong \ is a really good catch! I did'nt upload a new webrev, but maybe the incremental diff Is useful: http://cr.openjdk.java.net/~goetz/wr16/8160974-headful/webrev.02/incremental_fixes.patch Best regards, Goetz. > -Original

Re: [OpenJDK 2D-Dev] RFR(L): 8160974: [TESTBUG] Mark more headful tests with @key headful.

2016-07-20 Thread Volker Simonis
Hi Götz, your change looks good. Thanks a lot for cleaning up all these tests! I only found one problem which you should fix: test/java/awt/Frame/MiscUndecorated/RepaintTest.java @@ -1,6 +1,6 @@ -/* +\/* Seems like there's an extra backslash at the beginning of the first line. You may also

[OpenJDK 2D-Dev] RFR(S): 8161923: Fix two memory issues.

2016-07-20 Thread Lindenmaier, Goetz
Hi This changes fixes two memory issues. In awt_PrintControl.cpp, a wrong pointer is freed. In LigatureSubstProc2.cpp, line 157: stack[++mm] = componentGlyph; can overwrite the stack by one element. It will write stack[nComponents], because ++mm increments before accessing the array. Fix: