sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpet...@apache.org
Subject svn commit: r1649541 - /sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java
Date Mon, 05 Jan 2015 15:04:12 GMT
Author: mpetria
Date: Mon Jan  5 15:04:11 2015
New Revision: 1649541

URL: http://svn.apache.org/r1649541
Log:
SLING-4281: returning tracked agents from component provider

Modified:
    sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java

Modified: sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java?rev=1649541&r1=1649540&r2=1649541&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java
(original)
+++ sling/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DefaultDistributionComponentProvider.java
Mon Jan  5 15:04:11 2015
@@ -69,7 +69,9 @@ public class DefaultDistributionComponen
 
     public <ComponentType> ComponentType getComponent(@Nonnull Class<ComponentType>
type,
                                                                                    @Nullable
String componentName) {
-        if (type.isAssignableFrom(DistributionPackageExporter.class)) {
+        if (type.isAssignableFrom(DistributionAgent.class)) {
+            return (ComponentType) distributionAgentMap.get(componentName);
+        } else if (type.isAssignableFrom(DistributionPackageExporter.class)) {
             return (ComponentType) distributionPackageExporterMap.get(componentName);
         } else if (type.isAssignableFrom(DistributionPackageImporter.class)) {
             return (ComponentType) distributionPackageImporterMap.get(componentName);



Mime
View raw message