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 2015/09/04 13:55:18 UTC

svn commit: r1701226 - /stanbol/branches/release-0.12/enhancement-engines/lucenefstlinking/src/main/java/org/apache/stanbol/enhancer/engines/lucenefstlinking/FstLinkingEngineComponent.java

Author: rwesten
Date: Fri Sep  4 11:55:18 2015
New Revision: 1701226

URL: http://svn.apache.org/r1701226
Log:
STANBOL-1440: fixed a bug introduced by refactoring in the previouse commit

Modified:
    stanbol/branches/release-0.12/enhancement-engines/lucenefstlinking/src/main/java/org/apache/stanbol/enhancer/engines/lucenefstlinking/FstLinkingEngineComponent.java

Modified: stanbol/branches/release-0.12/enhancement-engines/lucenefstlinking/src/main/java/org/apache/stanbol/enhancer/engines/lucenefstlinking/FstLinkingEngineComponent.java
URL: http://svn.apache.org/viewvc/stanbol/branches/release-0.12/enhancement-engines/lucenefstlinking/src/main/java/org/apache/stanbol/enhancer/engines/lucenefstlinking/FstLinkingEngineComponent.java?rev=1701226&r1=1701225&r2=1701226&view=diff
==============================================================================
--- stanbol/branches/release-0.12/enhancement-engines/lucenefstlinking/src/main/java/org/apache/stanbol/enhancer/engines/lucenefstlinking/FstLinkingEngineComponent.java (original)
+++ stanbol/branches/release-0.12/enhancement-engines/lucenefstlinking/src/main/java/org/apache/stanbol/enhancer/engines/lucenefstlinking/FstLinkingEngineComponent.java Fri Sep  4 11:55:18 2015
@@ -734,12 +734,12 @@ public class FstLinkingEngineComponent {
         BundleContext bundleContext = this.bundleContext;
         //We need to keep the old configuration vars for unregistering the
         //current engine (see #unregisterEngine(..) method)
-        ServiceRegistration<?> oldEngineRegistration = this.engineRegistration;
-        SolrCore oldSolrCore = this.solrCore;
-        IndexConfiguration oldIndexConfig = this.indexConfig;
+        final ServiceRegistration<?> oldEngineRegistration = this.engineRegistration;
+        final SolrCore oldSolrCore = this.solrCore;
+        final IndexConfiguration oldIndexConfig = this.indexConfig;
+        SolrCore core;
+        IndexConfiguration indexConfig; // the indexConfig build by this call
         synchronized (this) { //init one after the other in case of multiple calls
-            SolrCore core;
-            IndexConfiguration indexConfig; // the indexConfig build by this call
             try { //try to init - finally unregisterEngine
                 if(bundleContext == null){ //already deactivated
                     return; //NOTE: unregistering is done in finally block
@@ -885,10 +885,9 @@ public class FstLinkingEngineComponent {
                 engineRegistration.unregister();
             } catch(IllegalStateException e) {
                 //already unregistered ... can be ignored
-                log.debug("Unexpected State: Service for FSTLinkingEngine "
+                log.warn("Unexpected State: Service for FSTLinkingEngine "
                         + engineName+" was already deactivated.", e);
             }
-            this.engineRegistration = null; //reset the field
         } else {
             log.debug(" ... no (old) engine registration present");
         }