incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1346478 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/SystemBundleUpdateTask.java
Date Tue, 05 Jun 2012 17:18:00 GMT
Author: cziegeler
Date: Tue Jun  5 17:17:59 2012
New Revision: 1346478

URL: http://svn.apache.org/viewvc?rev=1346478&view=rev
Log:
SLING-2497 : updating a system fragment extension causes an NPE

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

Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/SystemBundleUpdateTask.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/SystemBundleUpdateTask.java?rev=1346478&r1=1346477&r2=1346478&view=diff
==============================================================================
--- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/SystemBundleUpdateTask.java
(original)
+++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/tasks/SystemBundleUpdateTask.java
Tue Jun  5 17:17:59 2012
@@ -36,6 +36,8 @@ public class SystemBundleUpdateTask exte
 
     private static final String BUNDLE_UPDATE_ORDER = "99-";
 
+    private static final String SYSTEM_BUNDLE_UPDATE_ORDER = BUNDLE_UPDATE_ORDER + "systembundle(0)";
+
     private final BundleTaskCreator creator;
 
     public SystemBundleUpdateTask(final TaskResourceGroup r,
@@ -59,7 +61,7 @@ public class SystemBundleUpdateTask exte
 
                 @Override
                 public String getSortKey() {
-                    return BUNDLE_UPDATE_ORDER + getResource().getURL();
+                    return SYSTEM_BUNDLE_UPDATE_ORDER;
                 }
 
                 @Override
@@ -118,6 +120,9 @@ public class SystemBundleUpdateTask exte
 
     @Override
     public String getSortKey() {
+        if ( getResource() == null ) {
+            return SYSTEM_BUNDLE_UPDATE_ORDER;
+        }
         return BUNDLE_UPDATE_ORDER + getResource().getURL();
     }
 }
\ No newline at end of file



Mime
View raw message