You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2018/01/11 22:03:35 UTC

svn commit: r1820935 - /uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java

Author: cwiklik
Date: Thu Jan 11 22:03:35 2018
New Revision: 1820935

URL: http://svn.apache.org/viewvc?rev=1820935&view=rev
Log:
UIMA-5703 Fixed cause of the NPE. While cleaning up the inputchannel instance is set to null by one thread while other threads still operates on that instance. Fix was to remove nullifying the inputchannel instance. No need to do that.

Modified:
    uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java

Modified: uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
URL: http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java?rev=1820935&r1=1820934&r2=1820935&view=diff
==============================================================================
--- uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java (original)
+++ uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java Thu Jan 11 22:03:35 2018
@@ -2005,7 +2005,7 @@ public abstract class BaseAnalysisEngine
     if (inputChannelList != null) {
       inputChannelList.clear();
     }
-    inputChannel = null;
+    //inputChannel = null;
 
     if (serviceErrorMap != null) {
       serviceErrorMap.clear();
@@ -2149,7 +2149,6 @@ public abstract class BaseAnalysisEngine
   }
 
   public void terminate(Throwable cause, String aCasReferenceId) {
-
       if (stopLatch.getCount() > 0) {
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
           UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, getClass().getName(), "terminate",
@@ -2431,9 +2430,9 @@ public abstract class BaseAnalysisEngine
   public InputChannel getInputChannel(String anEndpointName) {
 
     for (int i = 0; inputChannelList != null && i < inputChannelList.size(); i++) {
-      InputChannel iC = (InputChannel) inputChannelList.get(i);
-      if (iC.isListenerForDestination(anEndpointName)) {
-        return (InputChannel) inputChannelList.get(i);
+      InputChannel iC = inputChannelList.get(i);
+      if (iC != null && iC.isListenerForDestination(anEndpointName)) {
+        return inputChannelList.get(i);
       }
     }
     return null;