On Fri, 29 Jan 2021 10:53:42 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> This completes the desktop module JNF removal
>> 
>> * remove  -framework JavaNativeFoundation from make files
>> 
>> * remove  #import <JavaNativeFoundation/JavaNativeFoundation.h> from all 
>> source files. If needed add import of JNIUtilities.h to get jni.h 
>> definitions - better anyway since then it gets the current JDK ones not the 
>> ones from the O/S
>> 
>> * replace JNFNSToJavaString with NSStringToJavaString and  JNFJavaToNSString 
>> with JavaStringToNSString
>> 
>> * replace JNFNormalizedNSStringForPath with 
>> NormalizedPathNSStringFromJavaString and JNFNormalizedJavaStringForPath with 
>> NormalizedPathJavaStringFromNSString
>> 
>> * replace JNFGet/ReleaseStringUTF16UniChars with direct calls to JNI
>> 
>> * Map all JNFRunLoop perform* calls to the ThreadUtilities versions (the 
>> vast majority already did this)
>> 
>> * Redo the ThreadUtilities calls to JNFRunLoop to directly invoke NSObject 
>> perform* methods.
>> 
>> * define new javaRunLoopMode in ThreadUtilities to replace the JNF one and 
>> use where needed.
>> 
>> * Remove the single usage of JNFPerformEnvBlock
>> 
>> * replace JNFJavaToNSNumber in single A11Y file with local replacement
>> 
>> * replace single usage of JNFNSTimeIntervalToJavaMillis in ScreenMenu.m with 
>> local replacement
>> 
>> * remove un-needed JNFRunLoopDidStartNotification from NSApplicationAWT.m
>> 
>> * misc. remaining cleanup (eg missed JNF_CHECK_AND_RETHROW_EXCEPTION)
>
> I mostly have questions about what is missing from this PR. :-) (If this is 
> supposed to remove the final remnants of JNF)
> 
> - There is a disabled warning in `make/autoconf/flags-cflags.m4`, line 173, 
> referring to JavaNativeFoundation. It can presumably be removed. If it 
> triggers individually instead, the warning should be disabled on a 
> per-library basis.
> 
> - In `make/modules/java.base/Lib.gmk`, line 99 & 113, are references to 
> JavaNativeFoundation. It seems that `libosxsecurity` needs to be cleaned from 
> JNF as well. Also, the comments indicate that the exception for STATIC_BUILD 
> can be removed. (You can verify this with `configure --enable-static-build`)
> 
> - In `make/modules/java.desktop/Lib.gmk`, line 129, and 
> `make/modules/java.desktop/lib/Awt2dLibraries.gmk`, line 866 & 094, it seems 
> like `libosx`, `libawt_lwawt`, and `liboxui` also has JNF that needs to be 
> removed. If these are fixed in any of the other issues for the umbrella 
> JDK-8257852, I apologize. I could not figure that out.
> 
> - There is also a test dependency that I have seen being addressed, in 
> `make/test/JtregNativeJdk.gmk` line 82, for `libTestMainKeyWindow`.

Right, this is the desktop module as per the first line of the comment.
java.base needs to be removed by the other PR as Erik said.
I  had not spotted it, but I don't see  why the make/test /JtregNativeJdk.gmk 
case needs to link this framework.
I don't see it being used by the test in question.
But we can just remove it and prove it - but probably a separate PR since it is 
nothing to do with the desktop module and the autoconf code needs to be updated 
once everything else is in.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2305

Reply via email to