Object.finalize() is being deprecated in Java 9 and bound to be removed in later versions.
And, what I find more important, it creates significant performance issues. When the class implements finalize() the Hotspot VM internally calls java.lang.ref.Finalizer#add() from Object's constructor, and there is a synchronized block in it. Spring-data-jpa creates lots of DeferredQueryInvocationHandler objects.
Consider using Java 9 Cleaner API. But if I understand correctly, the finalize() is there only "for open/close statistics to be in sync".