diff options
Diffstat (limited to 'jurt/com')
-rw-r--r-- | jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java | 25 | ||||
-rw-r--r-- | jurt/com/sun/star/uno/WeakReference.java | 25 |
2 files changed, 25 insertions, 25 deletions
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java index c9473eae9a87..722f825e6ba5 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/java_remote_bridge.java @@ -258,21 +258,22 @@ public class java_remote_bridge final void remRefHolder(Type type, String oid) { synchronized (refHolders) { LinkedList<RefHolder> l = refHolders.get(oid); - if (l != null) { - for (RefHolder rh : l) { - if (rh.getType().equals(type)) { - try { - if (rh.release()) { - l.remove(rh); - if (l.isEmpty()) { - refHolders.remove(oid); - } + if (l == null) { + return; + } + for (RefHolder rh : l) { + if (rh.getType().equals(type)) { + try { + if (rh.release()) { + l.remove(rh); + if (l.isEmpty()) { + refHolders.remove(oid); } - } finally { - release(); } - break; + } finally { + release(); } + break; } } } diff --git a/jurt/com/sun/star/uno/WeakReference.java b/jurt/com/sun/star/uno/WeakReference.java index 261bc1a170a2..81c4cd4facaf 100644 --- a/jurt/com/sun/star/uno/WeakReference.java +++ b/jurt/com/sun/star/uno/WeakReference.java @@ -43,19 +43,18 @@ public class WeakReference */ public WeakReference(WeakReference obj) { - if (obj != null) - { - Object weakImpl= obj.get(); - if (weakImpl != null) - { - XWeak weak= UnoRuntime.queryInterface(XWeak.class, weakImpl); - if (weak != null) - { - XAdapter adapter= weak.queryAdapter(); - if (adapter != null) - m_listener= new OWeakRefListener(adapter); - } - } + if (obj == null) { + return; + } + Object weakImpl = obj.get(); + if (weakImpl == null) { + return; + } + XWeak weak = UnoRuntime.queryInterface(XWeak.class, weakImpl); + if (weak != null) { + XAdapter adapter = weak.queryAdapter(); + if (adapter != null) + m_listener = new OWeakRefListener(adapter); } } |