sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1239021 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java
Date Wed, 01 Feb 2012 09:33:01 GMT
Author: cziegeler
Date: Wed Feb  1 09:33:00 2012
New Revision: 1239021

URL: http://svn.apache.org/viewvc?rev=1239021&view=rev
Log:
SLING-2394 : Resource type might be null if provided artifact is not copied

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

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java?rev=1239021&r1=1239020&r2=1239021&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java
Wed Feb  1 09:33:00 2012
@@ -88,6 +88,7 @@ public class InternalResource extends In
             // we always compute a digest
             digest = FileDataStore.computeDigest(dict);
         } else {
+            type = (type != null ? type : InstallableResource.TYPE_FILE);
             if ( resourceUri != null ) {
                 digest = resource.getDigest();
             } else {
@@ -97,7 +98,6 @@ public class InternalResource extends In
                         url,
                         resource.getDigest(),
                         resource.getType());
-                type = (type != null ? type : InstallableResource.TYPE_FILE);
                 if (resource.getDigest() != null && resource.getDigest().length()
> 0) {
                     digest = resource.getDigest();
                 } else {



Mime
View raw message