@Test public void testNonReentrantSupplier() { Map<String, Supplier<String>> suppliers = new HashMap<>(); suppliers.put("foo", new NonRecursiveSupplier<>(() -> suppliers.get("bar").get())); suppliers.put("bar", new NonRecursiveSupplier<>(() -> suppliers.get("foo").get())); exception.expect(NonRecursiveSupplierException.class); suppliers.get("foo").get(); }
@Override public T get() { acquire(); try { return _inner.get(); } finally { release(); } }
NonRecursiveSupplier implements Supplier<T>, com.google.common.base.Supplier<T> { @Override public T get() { acquire(); try { return _inner.get(); } finally { release(); } } }
NonRecursiveSupplier implements Supplier<T>, com.google.common.base.Supplier<T> { @Override public T get() { acquire(); try { return _inner.get(); } finally { release(); } } NonRecursiveSupplier(Supplier<T> inner); }
NonRecursiveSupplier implements Supplier<T>, com.google.common.base.Supplier<T> { @Override public T get() { acquire(); try { return _inner.get(); } finally { release(); } } NonRecursiveSupplier(Supplier<T> inner); @Override T get(); }
NonRecursiveSupplier implements Supplier<T>, com.google.common.base.Supplier<T> { @Override public T get() { acquire(); try { return _inner.get(); } finally { release(); } } NonRecursiveSupplier(Supplier<T> inner); @Override T get();  }