On Fri, 13 Dec 2024 10:10:22 GMT, Taizo Kurashige <[email protected]> wrote:
>>> The native `GetXSpace` method needs to be defined on all platforms
>>
>> This change fixes that problem:
>>
>> --- a/test/jdk/java/io/File/libGetXSpace.c
>> +++ b/test/jdk/java/io/File/libGetXSpace.c
>> @@ -160,11 +160,11 @@ Java_GetXSpace_getSpace0
>> return totalSpaceIsEstimated;
>> }
>>
>> -#ifdef WINDOWS
>> JNIEXPORT jboolean JNICALL
>> Java_GetXSpace_isCDDrive
>> (JNIEnv *env, jclass cls, jstring root)
>> {
>> +#ifdef WINDOWS
>> const jchar* strchars = (*env)->GetStringChars(env, root, NULL);
>> if (strchars == NULL) {
>> JNU_ThrowByNameWithLastError(env, "java/lang/RuntimeException",
>> @@ -182,8 +182,10 @@ Java_GetXSpace_isCDDrive
>> }
>>
>> return JNI_TRUE;
>> -}
>> +#else
>> + return JNI_FALSE;
>> #endif
>> +}
>
> Sorry for my lack of consideration. Thank you for the proposal. I Fixed.
Thanks. I verified the fix.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21799#discussion_r1884531303