This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/maven-build-cache-extension.git


The following commit(s) were added to refs/heads/master by this push:
     new 9c023b3  Fix typo: rename rebuilded() to rebuilt() (#415)
9c023b3 is described below

commit 9c023b3f304b39e337d1171b11692f20c5704250
Author: Gili Tzabari <[email protected]>
AuthorDate: Mon Dec 15 04:52:45 2025 -0500

    Fix typo: rename rebuilded() to rebuilt() (#415)
    
    * Fix typo: rename rebuilded() to rebuilt()
    
    Corrects the method name to use proper English grammar.
    
    * Address review feedback: remove static import and rename parameter
    
    - Remove static import for rebuilt() method, use qualified 
CacheResult.rebuilt() instead
    - Rename parameter 'orig' to 'original' for clarity in both rebuilt() and 
rebuilded() methods
---
 .../org/apache/maven/buildcache/CacheControllerImpl.java   |  3 +--
 src/main/java/org/apache/maven/buildcache/CacheResult.java | 14 +++++++++++---
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java 
b/src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java
index 6dfee15..48cb5a0 100644
--- a/src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java
+++ b/src/main/java/org/apache/maven/buildcache/CacheControllerImpl.java
@@ -102,7 +102,6 @@
 import static org.apache.maven.buildcache.CacheResult.empty;
 import static org.apache.maven.buildcache.CacheResult.failure;
 import static org.apache.maven.buildcache.CacheResult.partialSuccess;
-import static org.apache.maven.buildcache.CacheResult.rebuilded;
 import static org.apache.maven.buildcache.CacheResult.success;
 import static org.apache.maven.buildcache.RemoteCacheRepository.BUILDINFO_XML;
 import static 
org.apache.maven.buildcache.checksum.KeyUtils.getVersionlessProjectKey;
@@ -529,7 +528,7 @@ public void save(
                     hashFactory.getAlgorithm());
             populateGitInfo(build, session);
             build.getDto().set_final(cacheConfig.isSaveToRemoteFinal());
-            cacheResults.put(getVersionlessProjectKey(project), 
rebuilded(cacheResult, build));
+            cacheResults.put(getVersionlessProjectKey(project), 
CacheResult.rebuilt(cacheResult, build));
 
             localCache.beforeSave(context);
 
diff --git a/src/main/java/org/apache/maven/buildcache/CacheResult.java 
b/src/main/java/org/apache/maven/buildcache/CacheResult.java
index e2c118b..6c1b5b2 100644
--- a/src/main/java/org/apache/maven/buildcache/CacheResult.java
+++ b/src/main/java/org/apache/maven/buildcache/CacheResult.java
@@ -70,10 +70,18 @@ public static CacheResult failure(CacheContext context) {
         return new CacheResult(RestoreStatus.FAILURE, null, context);
     }
 
-    public static CacheResult rebuilded(CacheResult orig, Build build) {
-        requireNonNull(orig);
+    public static CacheResult rebuilt(CacheResult original, Build build) {
+        requireNonNull(original);
         requireNonNull(build);
-        return new CacheResult(orig.status, build, orig.context);
+        return new CacheResult(original.status, build, original.context);
+    }
+
+    /**
+     * @deprecated Use {@link #rebuilt(CacheResult, Build)} instead.
+     */
+    @Deprecated
+    public static CacheResult rebuilded(CacheResult original, Build build) {
+        return rebuilt(original, build);
     }
 
     public boolean isSuccess() {

Reply via email to