[
https://jira.jboss.org/jira/browse/JBPM-1912?page=com.atlassian.jira.plug...
]
Thomas Diesler resolved JBPM-1912.
----------------------------------
Resolution: Won't Fix
Thanks Mauro for your valuable feedback.
This is a general issue with the jBPM3 code base, which exposes it's API in rather
unappreciated way (to say the least).
In many places jBPM3 expects that a "common secret" is shared with its clients
on how the combination of API calls is supposed to work.
We are working on a general JBoss BPM API, that is supposed to fix this and many other
issues. The first Alpha1 release will be shipped with jbpm-3.3.1. The new GWT-Console
already uses that API for it's process and task management.
org.jbpm.taskmgmt.exe.TaskMgmtInstance.getTaskInstances() should
return a clone or an unmodifiable view, otherwise documentation should explain it does
not
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBPM-1912
URL:
https://jira.jboss.org/jira/browse/JBPM-1912
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: API
Affects Versions: jBPM 3.3.0 GA
Reporter: Mauro Molinari
The method org.jbpm.taskmgmt.exe.TaskMgmtInstance.getTaskInstances() returns directly the
set internally used by the TaskMgmtInstance instance to track task instances, without
cloning it. This can cause client code to corrupt that set (adding or removing elements in
it) and corruption is "propagated" to all the task instances that share the same
TaskMgmtInstance instance.
I think that method should return a clone or an unmodifiable view of that set, otherwise
the Javadoc should state clearly that it does not, warning the client programmer of the
inherent risks.
A similar rule may apply to
org.jbpm.taskmgmt.exe.TaskMgmtInstance.getTaskInstancesWithVariableUpdates() too.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira