class ObjectPool<T> {
        private final ArrayBlockingQueue<T> queue;
        private final int size;
        private final ObjectFactory<T> factory;
        private static final Logger logger = LoggerFactory.getLogger(ObjectPool.class);

        public ObjectPool(int size, ObjectFactory<T> factory) {
            this.size = size;
            this.factory = factory;
            queue = new ArrayBlockingQueue<>(size);
            for (int i = 0; i < size; i++) {
                queue.add(factory.create());
            }
            logger.debug("Init the object pool with size {}", size);
        }

        public T borrowObject() {
            T t = queue.poll();
            if(t == null) {
                logger.debug("The pool is not enough, create a new object");
                return factory.create();
            }
            return t;
        }

        public void returnObject(T obj) {<FILL_FUNCTION_BODY>}

        public interface ObjectFactory<T> {
            T create();
            void reset(T obj);
        }
}

            if (obj == null) {
                return;
            }
            factory.reset(obj);
            queue.offer(obj);
        
<no_super_class>