File tree 3 files changed +5
-3
lines changed
jni/java/wallet/core/java
kotlin/wallet-core-kotlin/src/commonAndroidJvmMain/kotlin/com/trustwallet/core
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 4
4
import java .lang .ref .ReferenceQueue ;
5
5
import java .util .Set ;
6
6
import java .util .HashSet ;
7
+ import java .util .Collections ;
7
8
8
9
public class GenericPhantomReference extends PhantomReference <Object > {
9
10
private final long nativeHandle ;
10
11
private final OnDeleteCallback onDeleteCallback ;
11
12
12
- private static final Set <GenericPhantomReference > references = new HashSet <>();
13
+ private static final Set <GenericPhantomReference > references = Collections . synchronizedSet ( new HashSet <>() );
13
14
private static final ReferenceQueue <Object > queue = new ReferenceQueue <>();
14
15
15
16
static {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.trustwallet.core
2
2
3
3
import java.lang.ref.PhantomReference
4
4
import java.lang.ref.ReferenceQueue
5
+ import java.util.Collections
5
6
6
7
internal class GenericPhantomReference private constructor(
7
8
referent : Any ,
@@ -10,7 +11,7 @@ internal class GenericPhantomReference private constructor(
10
11
) : PhantomReference<Any>(referent, queue) {
11
12
12
13
companion object {
13
- private val references: MutableSet <GenericPhantomReference > = HashSet ()
14
+ private val references: MutableSet <GenericPhantomReference > = Collections .synchronizedSet( HashSet () )
14
15
private val queue: ReferenceQueue <Any > = ReferenceQueue ()
15
16
16
17
init {
Original file line number Diff line number Diff line change @@ -27,5 +27,5 @@ cargo install cbindgen --locked
27
27
28
28
if [[ " $1 " == " dev" ]]; then
29
29
rustup component add llvm-tools-preview clippy rustfmt
30
- cargo install cargo-llvm-cov --locked
30
+ cargo install --version 0.6.14 cargo-llvm-cov --locked
31
31
fi
You can’t perform that action at this time.
0 commit comments