[
https://jira.jboss.org/jira/browse/JBPM-2630?page=com.atlassian.jira.plug...
]
Alejandro Guizar updated JBPM-2630:
-----------------------------------
Why is the message invalid for configurations? Each time a JbpmContext is pushed/popped,
the corresponding JbpmConfiguration is also pushed/popped so that
JbpmContext.getCurrentJbpmContext (which was deprecated) could still be supported. There
is no other scenario for pushing/popping JbpmConfigurations. If a JbpmConfiguration is not
found in the thread-local stack, it was most likely because the JbpmContext was closed in
a thread where it wasn't created, hence the warning.
JbpmConfiguration.popJbpmConfiguration() doesn't implement a pop
operation
--------------------------------------------------------------------------
Key: JBPM-2630
URL:
https://jira.jboss.org/jira/browse/JBPM-2630
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.7, jBPM 3.2.8
Reporter: Toshiya Kobayashi
Assignee: Alejandro Guizar
Fix For: jBPM 3.2.9
Attachments: mylyn-context.zip
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
org.jbpm.JbpmConfiguration.java:
=====
synchronized void popJbpmConfiguration() {
getJbpmConfigurationStack().remove(this);
}
=====
List.remove() can break ordering in the jbpmConfigurationStack, then eventually
getCurrentJbpmConfiguration() will return an wrong jbpmConfiguration instance.
(List.remove(java.lang.Object) behaves like FIFO if there are multiple elements which
refer the same object)
On the other hand, popJbpmContext() pops properly.
=====
void popJbpmContext(JbpmContext jbpmContext) {
List stack = getJbpmContextStack();
int size = stack.size();
if (size == 0) {
...
}
else if (jbpmContext != stack.remove(size - 1)) {
...
}
}
=====
--
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