diff options
-rw-r--r-- | ridljar/com/sun/star/uno/UnoRuntime.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java index 8178b51a2750..28e79cbb4089 100644 --- a/ridljar/com/sun/star/uno/UnoRuntime.java +++ b/ridljar/com/sun/star/uno/UnoRuntime.java @@ -382,8 +382,11 @@ public class UnoRuntime { * previously set context will be removed */ public static void setCurrentContext(XCurrentContext context) { - // optimize this by using Java 1.5 ThreadLocal.remove if context == null - currentContext.set(context); + if (context == null) { + currentContext.remove(); + } else { + currentContext.set(context); + } } /** |