Skip to content

Commit 69d611c

Browse files
committed
[bugfix] Make thread-safe
1 parent b58fc1b commit 69d611c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

exist-core/src/main/java/org/exist/SystemProperties.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,22 @@
2525
import java.io.InputStream;
2626
import java.util.Properties;
2727

28-
import com.evolvedbinary.j8fu.lazy.LazyVal;
28+
import com.evolvedbinary.j8fu.lazy.AtomicLazyVal;
29+
import net.jcip.annotations.ThreadSafe;
2930
import org.apache.logging.log4j.LogManager;
3031
import org.apache.logging.log4j.Logger;
3132

3233
/**
3334
*
34-
* @author aretter
35+
* @author <a href="mailto:[email protected]">Adam Retter</a>
3536
*/
37+
@ThreadSafe
3638
public class SystemProperties {
3739

3840
private static final Logger LOG = LogManager.getLogger(SystemProperties.class);
3941
private static final SystemProperties instance = new SystemProperties();
4042

41-
private final LazyVal<Properties> properties = new LazyVal<>(this::load);
43+
private final AtomicLazyVal<Properties> properties = new AtomicLazyVal<>(this::load);
4244

4345
public final static SystemProperties getInstance() {
4446
return instance;

0 commit comments

Comments
 (0)