Apache Commons Pool
Reuse local Java objects over multiple operations through a configurable pool.
apache · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
Add org.apache.commons:commons-pool2:2.13.1 to a small Java project. Borrow a sample object, return it and verify the same object is reused.
What we tested
2.13.1. Borrow a sample object, return it and verify the same object is reused. Borrowed and returned the sample object, then confirmed it was reused.