clean up ts stubs downloading
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Fri, 12 Aug 2016 17:50:25 +0000 (20:50 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Fri, 12 Aug 2016 17:50:25 +0000 (20:50 +0300)
platform/util/src/com/intellij/openapi/util/AtomicNotNullLazyValue.java

index 194ae2974b869182d230023dbda5a28a9e70e2cb..108e0443a3491de5905daca0363879efe2f32f3e 100644 (file)
@@ -45,4 +45,15 @@ public abstract class AtomicNotNullLazyValue<T> extends NotNullLazyValue<T> {
     }
     return value;
   }
-}
\ No newline at end of file
+
+  @NotNull
+  public static <T> AtomicNotNullLazyValue<T> create(@NotNull final NotNullFactory<T> value) {
+    return new AtomicNotNullLazyValue<T>() {
+      @NotNull
+      @Override
+      protected T compute() {
+        return value.create();
+      }
+    };
+  }
+}