sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1225840 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java
Date Fri, 30 Dec 2011 15:13:40 GMT
Author: cziegeler
Date: Fri Dec 30 15:13:40 2011
New Revision: 1225840

URL: http://svn.apache.org/viewvc?rev=1225840&view=rev
Log:
SLING-2346 : Config digest needs to be recalculated for older resources

Modified:
    sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java?rev=1225840&r1=1225839&r2=1225840&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java
Fri Dec 30 15:13:40 2011
@@ -140,6 +140,12 @@ public class RegisteredResourceImpl
         }
         if ( version > 2 ) {
             this.dataUri = (String)in.readObject();
+        } else if ( InstallableResource.TYPE_CONFIG.equals(this.resourceType) &&
this.dictionary != null ) {
+            // update digest calculated by older versions
+            final String updatedDigest = FileDataStore.computeDigest(this.dictionary);
+            if ( !updatedDigest.equals(this.digest) ) {
+                this.digest = updatedDigest;
+            }
         }
     }
 



Mime
View raw message