refactor: update Suppliers
@@ -6,13 +6,7 @@ import java.util.function.Supplier;
public class Suppliers {
public static <T> Supplier<T> ofWeakReference(T value) {
- return new Supplier<>() {
WeakReference<T> reference = new WeakReference<>(value);
-
- @Override
- public T get() {
- return reference.get();
- }
- };
+ return reference::get;
}
}
