summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-03-05 02:53:48 (EST)
committerSven Rottstock2013-03-11 06:38:49 (EDT)
commit66b04d5e53860bd6443816b9c80a05a59cf35ffb (patch)
tree069078cc5b9e8529be4090188f221bae667cc1e8
parentb25a9c678bd7450f09392053c5055d6cba70d8c0 (diff)
downloadorg.eclipse.stardust.ui.web-66b04d5e53860bd6443816b9c80a05a59cf35ffb.zip
org.eclipse.stardust.ui.web-66b04d5e53860bd6443816b9c80a05a59cf35ffb.tar.gz
org.eclipse.stardust.ui.web-66b04d5e53860bd6443816b9c80a05a59cf35ffb.tar.bz2
Jira-ID: CRNT-28091
Added a check if activityCount =0, prevent decrement operation in handleActivityEvent in ParticipantWorklistCacheManager.java, ProcessWorklistCacheManager.java and SpecialWorklistCacheManager.java. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63473 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ParticipantWorklistCacheManager.java2
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java4
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/SpecialWorklistCacheManager.java5
3 files changed, 7 insertions, 4 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ParticipantWorklistCacheManager.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ParticipantWorklistCacheManager.java
index a20e7f8..12c4a4e 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ParticipantWorklistCacheManager.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ParticipantWorklistCacheManager.java
@@ -166,7 +166,7 @@ public class ParticipantWorklistCacheManager implements InitializingBean, Serial
{
ParticipantWorklistCacheEntry oldEntry = participantWorklists.get(new ParticipantInfoWrapper(oldAi
.getCurrentPerformer()));
- if (null != oldEntry && oldEntry.getCount() < oldEntry.getTotalCountThreshold())
+ if (null != oldEntry && (oldEntry.getCount() > 0 && oldEntry.getCount() < oldEntry.getTotalCountThreshold()))
{
oldEntry.setCount(oldEntry.getCount() - 1);
}
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java
index 57aa5fa..2c726dd 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/ProcessWorklistCacheManager.java
@@ -188,8 +188,10 @@ public class ProcessWorklistCacheManager implements InitializingBean
}
else if (ActivityEvent.ABORTED.equals(event.getType()) || ActivityEvent.COMPLETED.equals(event.getType()))
{
- if (entry.getCount() < entry.getTotalCountThreshold())
+ if (entry.getCount() > 0 && entry.getCount() < entry.getTotalCountThreshold())
+ {
entry.setCount(entry.getCount() - 1);
+ }
}
}
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/SpecialWorklistCacheManager.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/SpecialWorklistCacheManager.java
index 791c22d..4c5ccef 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/SpecialWorklistCacheManager.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/utils/SpecialWorklistCacheManager.java
@@ -146,11 +146,12 @@ public class SpecialWorklistCacheManager implements InitializingBean, Serializab
}
else if (ActivityEvent.ABORTED.equals(event.getType()) || ActivityEvent.COMPLETED.equals(event.getType()))
{
- if (allActivities.getCount() < Long.MAX_VALUE)
+ if (allActivities.getCount() > 0 && allActivities.getCount() < allActivities.getTotalCountThreshold())
{
allActivities.setCount(allActivities.getCount() - 1);
}
- if (isActivityCritical(oldAi) && criticialActivities.getCount() < Long.MAX_VALUE)
+ if (isActivityCritical(oldAi)
+ && (criticialActivities.getCount() > 0 && criticialActivities.getCount() < criticialActivities.getTotalCountThreshold()))
{
criticialActivities.setCount(criticialActivities.getCount() - 1);
}