Copy new release of code from JNIManagedPeerBase