You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2011/12/30 16:13:40 UTC
svn commit: r1225840 -
/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/RegisteredResourceImpl.java
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;
+ }
}
}