From cab719c90702dd07224494203f9ee97a3c1adea1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 25 Jan 2022 15:26:27 +0100 Subject: EInfoReport: Use via share_ptr to allow CoW replacement and copy once (via Java as well); Drop JavaUplink, not used. --- java/jau/direct_bt/DBTDevice.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'java/jau') diff --git a/java/jau/direct_bt/DBTDevice.java b/java/jau/direct_bt/DBTDevice.java index c7926cf7..0e1b44f6 100644 --- a/java/jau/direct_bt/DBTDevice.java +++ b/java/jau/direct_bt/DBTDevice.java @@ -652,8 +652,10 @@ public class DBTDevice extends DBTObject implements BTDevice @Override public final EInfoReport getEIR() { - getEIRImpl(eir_); - return eir_; + synchronized( eir_ ) { + getEIRImpl(eir_); + return eir_; + } } private native void getEIRImpl(final EInfoReport eir); -- cgit v1.2.3