RFR: JDK-8244220 : Compiler error in jpackage with VS2019

Alexey Semenyuk alexey.semenyuk at oracle.com
Fri May 1 23:18:41 UTC 2020


Evaluation:

Code snippet at memory(1871):
---
     ~unique_ptr() noexcept {
         if (_Mypair._Myval2) {
             _Mypair._Get_first()(_Mypair._Myval2);
         }
     }
---

Where '_Myval2' is of type jni::JniObjWithEnv defined in JniUtils.h.

JniObjWithEnv is a struct wrapping two pointers: JNIEnv* and jobject. It 
requires user defined bool operator to make code in ~unique_ptr() 
compile. By some reason vs2017 didn't complain on missing bool operator.

I've added the evaluation in the comments section of the bug report as well.

- Alexey

On 5/1/2020 6:21 PM, Philip Race wrote:
> It may be self-evident but I really like to see a RFR include an 
> evaluation
> and explanation of the fix and the same in the bug report.
>
> Please do both.
>
> -phil.
>
> On 5/1/20, 1:00 PM, Alexey Semenyuk wrote:
>> Please review fix [2] for jpackage bug [1].
>>
>> Fix vs2019 compliation error.
>>
>> - Alexey
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8244220
>>
>> [2] http://cr.openjdk.java.net/~asemenyuk/8244220/webrev.00
>>



More information about the core-libs-dev mailing list