diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 09:02:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 10:35:51 +0200 |
commit | 252ed1708ad5a007e4c47c243595206650876a2b (patch) | |
tree | b2a7a47f8a39c598c25355640a77022918c2d209 /javaunohelper | |
parent | a240a78cc771a89febfe181abe78d2cf16e1970f (diff) |
double-checked locking is not thread-safe in Java
found by PMD
Change-Id: Ibd4a9139c626932bec56c0b1dd32b4d59c8440b1
Diffstat (limited to 'javaunohelper')
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java index 2c808e3e9866..ca72af9c81ac 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java @@ -358,16 +358,10 @@ XMultiPropertySet } } //XPropertySet ---------------------------------------------------- - public com.sun.star.beans.XPropertySetInfo getPropertySetInfo() + public synchronized com.sun.star.beans.XPropertySetInfo getPropertySetInfo() { if (propertySetInfo == null) - { - synchronized (this) - { - if (propertySetInfo == null) - propertySetInfo= new PropertySetInfo(); - } - } + propertySetInfo= new PropertySetInfo(); return propertySetInfo; } //XPropertySet ---------------------------------------------------- |