ctubbsii commented on PR #39: URL: https://github.com/apache/accumulo-classloaders/pull/39#issuecomment-3751265249
I don't think we need a cleaner at all. Registering a cleaner to call close, that triggers the internal cleanable action on ZipFile.CleanableResource, is kind of a waste. It might make sense to call close normally, but registering another cleaner to do what an existing cleaner is doing isn't worth it. Similarly, we should not be creating a finalizer that does the same thing that the cleaner would have done, since Cleaner is the replacement for finalizers. There's a good chance that ZipFile.CleanableResource's cleaner actions were previously finalizers that were rewritten as Cleaners. It doesn't make sense to reintroduce a new finalize method to do the same work that was previously refactored into a Cleaner. @keith-turner suggested that a simple comment explaining why we don't need to close the URLClassLoader instances would probably suffice. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
