<AWT Dev> [PATCH] Fix some C++ conformance issues in AWT Windows code

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Thu May 30 03:13:55 UTC 2019


On 29/05/2019 16:57, Andrew Luo wrote:
> Yep, I can confirm that the name on the list is indeed me (and not someone else with the same name).  I have contributed to OpenJDK before, just not in this mailing list/group.

Thank you for the confirmation, I have created the bug/webrev:
https://bugs.openjdk.java.net/browse/JDK-8225032
http://cr.openjdk.java.net/~serb/andrew_Luo/8225032/webrev.00

I'll sponsor the fix if there are no objections.

> 
> Thanks,
> 
> -Andrew
> 
> -----Original Message-----
> From: awt-dev <awt-dev-bounces at openjdk.java.net> On Behalf Of Philip Race
> Sent: Tuesday, May 28, 2019 7:08 PM
> To: Sergey Bylokhov <Sergey.Bylokhov at oracle.com>
> Cc: awt-dev at openjdk.java.net
> Subject: Re: <AWT Dev> [PATCH] Fix some C++ conformance issues in AWT Windows code
> 
> PS the changes look fine to me.
> 
> -phil
> 
> On 5/28/19, 2:16 PM, Philip Race wrote:
>> Andrew's name is on the list already.
>>
>> -phil.
>>
>> On 5/28/19, 2:04 PM, Sergey Bylokhov wrote:
>>> Hi, Andrew.
>>>
>>> Thank you for the patch! We would be glad to accept patches from you.
>>> However, you will need to sign an OCA before we can do that:
>>> https://www.oracle.com/technetwork/community/oca-486395.html
>>>
>>> On 28/05/2019 13:52, Andrew Luo wrote:
>>>> Adding an updated patch.  It seems I missed a file.
>>>>
>>>> Testing done: compiled with both /permissive- set and without.
>>>>
>>>> Thanks,
>>>>
>>>> -Andrew
>>>>
>>>> *From:* awt-dev <awt-dev-bounces at openjdk.java.net> *On Behalf Of
>>>> *Andrew Luo
>>>> *Sent:* Monday, May 13, 2019 5:40 PM
>>>> *To:* awt-dev at openjdk.java.net
>>>> *Subject:* <AWT Dev> [PATCH] Fix some C++ conformance issues in AWT
>>>> Windows code
>>>>
>>>> I've been trying to get the JDK to compile with the new /permissive-
>>>> switch in VS2017
>>>> (https://devblogs.microsoft.com/cppblog/permissive-switch/) however
>>>> there have been a few issues in various parts of the code.
>>>>
>>>> While testing this, I found some issues in the AWT code.  In one
>>>> case we name a function with the class:: prefix when the function is
>>>> declared inline in the class definition.  Other cases include where
>>>> we are assigning string literals to non-const char* variables.  I
>>>> took some time to fix these and attached a patch.  Let me know if
>>>> there are any comments.
>>>>
>>>> c:\Users\Andrew\Documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt.h(343):
>>>> error C2440: 'return': cannot convert from 'const unsigned short *'
>>>> to 'LPWSTR'
>>>>
>>>> c:\Users\Andrew\Documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt.h(343):
>>>> note: Conversion from string literal loses const qualifier (see
>>>> /Zc:strictStrings)
>>>>
>>>> c:\users\andrew\documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt_Component.h(455):
>>>> error C2061: syntax error: identifier 'javaKey'
>>>>
>>>> c:\users\andrew\documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt_Component.h(455):
>>>> error C4430: missing type specifier - int assumed. Note: C++ does
>>>> not support default-int
>>>>
>>>> Thanks,
>>>>
>>>> -Andrew
>>>>
>>>
>>>


-- 
Best regards, Sergey.


More information about the awt-dev mailing list