From f13b5742e57005246cde2982ffa4cca50be8bde9 Mon Sep 17 00:00:00 2001 From: Nikita Gryzlov Date: Fri, 17 Jul 2020 16:18:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20=D0=BF=D1=80=D1=8F?= =?UTF-8?q?=D0=BC=D0=BE=D0=B3=D0=BE=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/github/_1c_syntax/utils/Lazy.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/github/_1c_syntax/utils/Lazy.java b/src/main/java/com/github/_1c_syntax/utils/Lazy.java index 56c2218..bff7cd8 100644 --- a/src/main/java/com/github/_1c_syntax/utils/Lazy.java +++ b/src/main/java/com/github/_1c_syntax/utils/Lazy.java @@ -42,6 +42,10 @@ public Lazy(Supplier supplier, ReentrantLock lock) { this.lock = lock; } + public T get() { + return value; + } + public T getOrCompute(Supplier supplier) { final T result = value; // Just one volatile read if (result == null) {