You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2014/06/04 10:21:31 UTC
svn commit: r1599973 - in /stanbol/branches/release-0.12:
commons/namespaceprefix/service/src/main/java/org/apache/stanbol/commons/namespaceprefix/service/
entityhub/yard/sesame/src/main/java/org/apache/stanbol/entityhub/yard/sesame/impl/
Author: rwesten
Date: Wed Jun 4 08:21:31 2014
New Revision: 1599973
URL: http://svn.apache.org/r1599973
Log:
minor: fixed two NPE in deactivate methods
Modified:
stanbol/branches/release-0.12/commons/namespaceprefix/service/src/main/java/org/apache/stanbol/commons/namespaceprefix/service/StanbolNamespacePrefixService.java
stanbol/branches/release-0.12/entityhub/yard/sesame/src/main/java/org/apache/stanbol/entityhub/yard/sesame/impl/SesameYardComponent.java
Modified: stanbol/branches/release-0.12/commons/namespaceprefix/service/src/main/java/org/apache/stanbol/commons/namespaceprefix/service/StanbolNamespacePrefixService.java
URL: http://svn.apache.org/viewvc/stanbol/branches/release-0.12/commons/namespaceprefix/service/src/main/java/org/apache/stanbol/commons/namespaceprefix/service/StanbolNamespacePrefixService.java?rev=1599973&r1=1599972&r2=1599973&view=diff
==============================================================================
--- stanbol/branches/release-0.12/commons/namespaceprefix/service/src/main/java/org/apache/stanbol/commons/namespaceprefix/service/StanbolNamespacePrefixService.java (original)
+++ stanbol/branches/release-0.12/commons/namespaceprefix/service/src/main/java/org/apache/stanbol/commons/namespaceprefix/service/StanbolNamespacePrefixService.java Wed Jun 4 08:21:31 2014
@@ -309,12 +309,12 @@ public class StanbolNamespacePrefixServi
@Deactivate
protected void deactivate(ComponentContext ctx) {
- bundleContext = null;
if(providersTracker != null) {
providersTracker.close();
providersTracker = null;
}
mappingsFile = null;
+ bundleContext = null;
}
@Override
Modified: stanbol/branches/release-0.12/entityhub/yard/sesame/src/main/java/org/apache/stanbol/entityhub/yard/sesame/impl/SesameYardComponent.java
URL: http://svn.apache.org/viewvc/stanbol/branches/release-0.12/entityhub/yard/sesame/src/main/java/org/apache/stanbol/entityhub/yard/sesame/impl/SesameYardComponent.java?rev=1599973&r1=1599972&r2=1599973&view=diff
==============================================================================
--- stanbol/branches/release-0.12/entityhub/yard/sesame/src/main/java/org/apache/stanbol/entityhub/yard/sesame/impl/SesameYardComponent.java (original)
+++ stanbol/branches/release-0.12/entityhub/yard/sesame/src/main/java/org/apache/stanbol/entityhub/yard/sesame/impl/SesameYardComponent.java Wed Jun 4 08:21:31 2014
@@ -240,7 +240,9 @@ public class SesameYardComponent impleme
log.info(" - currently used Repository was removed (ref: {})", serviceReference);
unregisterSesameYard();
}
- List<ServiceReference> others = Arrays.asList(repositoryTracker.getServiceReferences());
+ ServiceReference[] serviceRefs = repositoryTracker.getServiceReferences();
+ List<ServiceReference> others = serviceRefs == null ? Collections.<ServiceReference>emptyList() :
+ Arrays.asList(serviceRefs);
if(others.size() > 1){
Collections.sort(others); //sort by priority
}