summaryrefslogtreecommitdiff
path: root/binaryurp
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-08-15 11:37:34 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-15 12:18:39 +0200
commitd58a927f4a66d2df9872fbe0a609b67f90f85147 (patch)
treee4fc125809ced3d18f3aaec62db37640568cc950 /binaryurp
parent5c740bd0aece50c62fa5c2d1d9382398ec6a2eb9 (diff)
fdo#43433: Binary URP works gracefully with old Java URP
...which did not support protocol properties yet. Change-Id: Ic5bb346764fb039856e16169d5ae96d01422e7e0 Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'binaryurp')
-rw-r--r--binaryurp/source/bridge.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index fbb70a40c835..216d8662530b 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -678,7 +678,24 @@ void Bridge::sendRequestChangeRequest() {
void Bridge::handleRequestChangeReply(
bool exception, BinaryAny const & returnValue)
{
- throwException(exception, returnValue);
+ try {
+ throwException(exception, returnValue);
+ } catch (css::uno::RuntimeException & e) {
+ // Before OOo 2.2, Java URP would throw a RuntimeException when
+ // receiving a requestChange message (see i#35277 "Java URP: Support
+ // Manipulation of Protocol Properties"):
+ if (mode_ != MODE_REQUESTED) {
+ throw;
+ }
+ SAL_WARN(
+ "binaryurp",
+ "requestChange caught RuntimeException \'" << e.Message
+ << "' in state 'requested'");
+ mode_ = MODE_NORMAL;
+ getWriter()->unblock();
+ decrementCalls();
+ return;
+ }
sal_Int32 n = *static_cast< sal_Int32 * >(
returnValue.getValue(
css::uno::TypeDescription(cppu::UnoType< sal_Int32 >::get())));