mail-api
mail-api copied to clipboard
finalize() in java.lang.Object has been deprecated
The finalize() in java.lang.Object has been deprecated in JDK 9. Various classes in JakartaMail implement a finalizer that should simply be removed.
This ticket can only be completed once https://github.com/jakartaee/mail-api/issues/709 is completed.
Goals for this ticket would be:
- Remove all finalizer methods from classes.
- Ensure that the existing close method for that class has the proper try/finally to ensure no unexpected failure prevent freeing the resource. Most classes need to be updated to cover this case.