@SuppressWarnings("unchecked")
    public final T get() {
        if (maxCapacityPerThread == 0) {
            return newObject(NOOP_HANDLE);
        }
        Stack<T> stack = threadLocal.get();
        DefaultHandle handle = stack.pop();
        if (handle == null) {
            handle = stack.newHandle();
            handle.value = newObject(handle);
        }
        return (T) handle.value;
    }
Light-weight object pool based on a thread-local stack.
<p/>
Forked from <a href="https://github.com/netty/netty">Netty</a>.

@param <T> the type of the pooled object
jraft-core/src/main/java/com/alipay/sofa/jraft/util/Recyclers.java