incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r896837 - /sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
Date Thu, 07 Jan 2010 10:24:58 GMT
Author: cziegeler
Date: Thu Jan  7 10:23:52 2010
New Revision: 896837

URL: http://svn.apache.org/viewvc?rev=896837&view=rev
Log:
SLING-1275 : Return value of ComponentContext#locateContext should be checked for null value

Modified:
    sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java

Modified: sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java?rev=896837&r1=896836&r2=896837&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
(original)
+++ sling/trunk/bundles/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
Thu Jan  7 10:23:52 2010
@@ -274,7 +274,9 @@
 
         AdapterFactory factory = (AdapterFactory) context.locateService(
             "AdapterFactory", reference);
-
+        if ( factory == null ) {
+            return;
+        }
         AdapterFactoryDescriptorKey factoryKey = new AdapterFactoryDescriptorKey(
             reference);
         AdapterFactoryDescriptor factoryDesc = new AdapterFactoryDescriptor(



Mime
View raw message