<AWT Dev> [9] Review request for 7042645: Numerous api/java_awt jck tests fail - AWT Assertion Failure on fastdebug ri bundles b138 win7 x86

Alexander Zvegintsev alexander.zvegintsev at oracle.com
Mon Apr 6 12:33:39 UTC 2015


Hello Semyon,

the fix looks good to me,
but could you please update the copyright year in all files and fix the 
indentation of if statement in awt_Button.cpp before push?

Thanks,

Alexander.

On 04/06/2015 03:11 PM, Semyon Sadetsky wrote:
> Hello,
>
> Please review fix for JDK9.
>
> webrev: http://cr.openjdk.java.net/~ssadetsky/7042645/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-7042645
>
> *ROOT CAUSE:
> The assertion fails message triggered in awt_Button.cpp because a 
> WinAPI function used to draw button focus rectangle returns zero. 
> Tests run successfully on the release build just because assertions 
> are ignored in it but they are in failure as well.
>
> MSDN documentation for the function return value:
>
> Return value
> If the function succeeds, the return value is nonzero.
> If the function fails, the return value is zero.
>
> is wrong, because it returns zero when window is not visible (for 
> example, outside visible screen area).
> The discrepancy reveals itself when the function returns zero which 
> means error but subsequent ::GetLastError() call returns error code 0 
> which means successful execution.
>
> The same exists in awt_Checkbox.cpp and awt_Component.cpp
>
> *SOLUTION
> ::GetlastError() returning error code is asserted to be 0 in case if 
> ::DrawFocusRect() returns zero.
>
> *TESTING
> This is a JCK test failure issue. No extra regression testing needed.
>
> --Semyon
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20150406/83703269/attachment.html>


More information about the awt-dev mailing list