There's code in wiredtiger.in with defined(SWIGJAVA):
#if defined(SWIGJAVA) #define WT_HANDLE_NULLABLE(typename) typename##_NULLABLE #define WT_HANDLE_CLOSED(typename) typename##_CLOSED typedef WT_CURSOR WT_CURSOR_NULLABLE; typedef WT_CURSOR WT_CURSOR_CLOSED; typedef WT_SESSION WT_SESSION_CLOSED; typedef WT_CONNECTION WT_CONNECTION_CLOSED; #elif !defined(DOXYGEN) #define WT_HANDLE_NULLABLE(typename) typename #define WT_HANDLE_CLOSED(typename) typename #endif
that should be removed.
Also, if WT_HANDLE_NULLABLE, WT_HANDLE_CLOSED are used anywhere, they can be removed, as they are now no-ops.