To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=54482
Issue #:|54482
Summary:|jurt PipeConnection.c Java exception handling
Component:|udk
Version:|680m124
Platform:|All
URL:|
OS/Version:|All
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P4
Subcomponent:|code
Assigned to:|sb
Reported by:|sb
------- Additional comments from [EMAIL PROTECTED] Mon Sep 12 01:51:19 -0700
2005 -------
In jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c, handling
of Java exceptions is broken. For example, ThrowException and MonitorExit are
called without a previous call to ExceptionClear, and state ACQUIRED is not
catered for in the error-handling code of
Java_com_sun_star_lib_connections_pipe_PipeConnection_readJNI.
The following is some prototypical code to use:
void native_fn(jobect o) {
if (env->MonitorEnter(o) < 0) return;
// ...
if (env->FindClass("...") == 0) {
// Some Java exception occurred while
// within the monitor, exit the monitor and
// return with a Java exception pending:
jthrowable e = env->ExceptionOccurred();
assert e != 0;
env->ExceptionClear();
if (env->MonitorExit(o) == 0) {
env->Throw(e); // even if Throw returns < 0,
// it is guaranteed that *some*
// exception is being thrown,
// right?
}
return;
}
// ...
env->MonitorExit(o);
}
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]