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 2009/09/08 17:25:01 UTC
svn commit: r812551 -
/incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java
Author: cwiklik
Date: Tue Sep 8 15:25:00 2009
New Revision: 812551
URL: http://svn.apache.org/viewvc?rev=812551&view=rev
Log:
UIMA-1560 synchronized access to 'remaining' var. Added check for null before dereferencing anAction
Modified:
incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java
Modified: incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java?rev=812551&r1=812550&r2=812551&view=diff
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java Tue Sep 8 15:25:00 2009
@@ -477,7 +477,7 @@
*
* @return Number of entities yet to be processed
*/
- public long getRemaining() {
+ public synchronized long getRemaining() {
return remaining;
}
@@ -487,7 +487,7 @@
* @param aRemainingCount -
* number of entities to process
*/
- public void setRemaining(long aRemainingCount) {
+ public synchronized void setRemaining(long aRemainingCount) {
remaining = aRemainingCount;
}
@@ -1286,7 +1286,7 @@
}
}
- if (Constants.DISABLE_CASPROCESSOR.equals(anAction.toLowerCase())) {
+ if (anAction != null && Constants.DISABLE_CASPROCESSOR.equals(anAction.toLowerCase())) {
return true;
}
return false;
@@ -1466,7 +1466,7 @@
Object stat = statMap.remove(aStatName);
if (stat instanceof Integer) {
int newValue = aStat.intValue() + ((Integer) stat).intValue();
- aStat = new Integer(newValue);
+ aStat = Integer.valueOf(newValue);
}
}
statMap.put(aStatName, aStat);