From d6a1b16de3df06a798d1e728219090810e6c1ebe Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 15 Aug 2012 11:37:34 +0200 Subject: 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 --- binaryurp/source/bridge.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx index 13987fe3bd51..af7118954808 100644 --- a/binaryurp/source/bridge.cxx +++ b/binaryurp/source/bridge.cxx @@ -677,7 +677,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()))); -- cgit