amirhadadi commented on code in PR #128:
URL: 
https://github.com/apache/maven-build-cache-extension/pull/128#discussion_r1470721805


##########
src/main/java/org/apache/maven/buildcache/BuildCacheMojosExecutionStrategy.java:
##########
@@ -134,7 +134,7 @@ public void execute(
             if (restorable) {
                 CacheRestorationStatus cacheRestorationStatus =
                         restoreProject(result, mojoExecutions, 
mojoExecutionRunner, cacheConfig);
-                restored &= CacheRestorationStatus.SUCCESS == 
cacheRestorationStatus;
+                restored = CacheRestorationStatus.SUCCESS == 
cacheRestorationStatus;

Review Comment:
   The `restored` variable name is misleading since it has 2 meanings:
   1) It starts as meaning _The build is fully cached_.
   2) The meaning may then change to _The build was restored from cache_.
   
   I suggest changing
   `boolean restored = result.isSuccess()`
   to
   `boolean restored = false`
   
   To avoid that confusion.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to