korlov42 commented on code in PR #7891:
URL: https://github.com/apache/ignite-3/pull/7891#discussion_r3000685616


##########
modules/core/src/main/java/org/apache/ignite/internal/util/Lazy.java:
##########
@@ -32,12 +32,12 @@ public class Lazy<T> {
 
     private volatile Supplier<T> supplier;
 
-    // This is a safe race, because we follow two simple rules: single read 
and safe initialization
-    @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
-    private @Nullable T val;
+    private volatile @Nullable T val;
 
     /**
      * Creates the lazy value with the given value supplier.
+     * In case of the given {@code supplier} throws an exception, the next 
call to {@link #get()} will re-invoke the supplier.

Review Comment:
   ```suggestion
       * Creates the lazy value with the given value supplier.
        * 
        * <p>In case of the given {@code supplier} throws an exception, the 
next call to {@link #get()} will re-invoke the supplier.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to