File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
objectbox-java/src/main/java/io/objectbox Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1178,7 +1178,7 @@ public SyncClient getSyncClient() {
1178
1178
return syncClient ;
1179
1179
}
1180
1180
1181
- public void setSyncClient (@ Nullable SyncClient syncClient ) {
1181
+ void setSyncClient (@ Nullable SyncClient syncClient ) {
1182
1182
this .syncClient = syncClient ;
1183
1183
}
1184
1184
}
Original file line number Diff line number Diff line change 17
17
package io .objectbox ;
18
18
19
19
import io .objectbox .annotation .apihint .Internal ;
20
+ import io .objectbox .sync .SyncClient ;
20
21
21
22
@ Internal
22
23
public class InternalAccess {
@@ -36,6 +37,10 @@ public static long getHandle(Transaction tx) {
36
37
return tx .internalHandle ();
37
38
}
38
39
40
+ public static void setSyncClient (BoxStore boxStore , SyncClient syncClient ) {
41
+ boxStore .setSyncClient (syncClient );
42
+ }
43
+
39
44
public static <T > void releaseReader (Box <T > box , Cursor <T > reader ) {
40
45
box .releaseReader (reader );
41
46
}
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public class SyncClientImpl implements SyncClient {
63
63
setLoginCredentials (builder .credentials );
64
64
65
65
// If created successfully, let store keep a reference so the caller does not have to.
66
- builder . boxStore . setSyncClient (this );
66
+ InternalAccess . setSyncClient (builder . boxStore , this );
67
67
68
68
if (!builder .manualStart ) {
69
69
start ();
@@ -169,7 +169,7 @@ public void close() {
169
169
if (boxStore != null ) {
170
170
SyncClient syncClient = boxStore .getSyncClient ();
171
171
if (syncClient == this ) {
172
- boxStore .setSyncClient (null );
172
+ InternalAccess .setSyncClient (boxStore , null );
173
173
}
174
174
this .boxStore = null ;
175
175
}
You can’t perform that action at this time.
0 commit comments