@@ -139,12 +139,6 @@ public static String getVersionNative() {
139
139
*/
140
140
public static native void testUnalignedMemoryAccess ();
141
141
142
- /**
143
- * @deprecated Use {@link #nativeCreateWithFlatOptions(byte[], byte[])} instead.
144
- */
145
- @ Deprecated
146
- static native long nativeCreate (String directory , long maxDbSizeInKByte , int maxReaders , byte [] model );
147
-
148
142
/**
149
143
* Creates a native BoxStore instance with FlatBuffer {@link io.objectbox.model.FlatStoreOptions} {@code options}
150
144
* and a {@link ModelBuilder} {@code model}. Returns the handle of the native store instance.
@@ -234,7 +228,6 @@ public static boolean isObjectBrowserAvailable() {
234
228
handle = nativeCreateWithFlatOptions (buildFlatStoreOptions (builder , canonicalPath ), builder .model );
235
229
int debugFlags = builder .debugFlags ;
236
230
if (debugFlags != 0 ) {
237
- nativeSetDebugFlags (handle , debugFlags );
238
231
debugTxRead = (debugFlags & DebugFlags .LOG_TRANSACTIONS_READ ) != 0 ;
239
232
debugTxWrite = (debugFlags & DebugFlags .LOG_TRANSACTIONS_WRITE ) != 0 ;
240
233
} else {
@@ -289,17 +282,20 @@ private byte[] buildFlatStoreOptions(BoxStoreBuilder builder, String canonicalPa
289
282
FlatStoreOptions .addDirectoryPath (fbb , directoryPathOffset );
290
283
FlatStoreOptions .addMaxDbSizeInKByte (fbb , builder .maxSizeInKByte );
291
284
FlatStoreOptions .addMaxReaders (fbb , builder .maxReaders );
292
- // FlatStoreOptions.addDebugFlags(fbb, builder.debugFlags); // TODO Use this instead of nativeSetDebugFlags?
293
- // TODO Add new values.
294
- FlatStoreOptions .addReadOnly (fbb , builder .readOnly );
295
- FlatStoreOptions .addUsePreviousCommit (fbb , builder .usePreviousCommit );
296
- FlatStoreOptions .addUsePreviousCommitOnValidationFailure (fbb , builder .usePreviousCommitOnValidationFailure );
297
- if (builder .validateOnOpenMode != 0 ) {
298
- FlatStoreOptions .addValidateOnOpen (fbb , builder .validateOnOpenMode );
299
- if (builder .validateOnOpenPageLimit != 0 ) {
300
- FlatStoreOptions .addValidateOnOpenPageLimit (fbb , builder .validateOnOpenPageLimit );
285
+ int validateOnOpenMode = builder .validateOnOpenMode ;
286
+ if (validateOnOpenMode != 0 ) {
287
+ FlatStoreOptions .addValidateOnOpen (fbb , validateOnOpenMode );
288
+ long validateOnOpenPageLimit = builder .validateOnOpenPageLimit ;
289
+ if (validateOnOpenPageLimit != 0 ) {
290
+ FlatStoreOptions .addValidateOnOpenPageLimit (fbb , validateOnOpenPageLimit );
301
291
}
302
292
}
293
+ FlatStoreOptions .addUsePreviousCommit (fbb , builder .usePreviousCommit );
294
+ FlatStoreOptions .addReadOnly (fbb , builder .readOnly );
295
+ int debugFlags = builder .debugFlags ;
296
+ if (debugFlags != 0 ) {
297
+ FlatStoreOptions .addDebugFlags (fbb , debugFlags );
298
+ }
303
299
304
300
int offset = FlatStoreOptions .endFlatStoreOptions (fbb );
305
301
fbb .finish (offset );
0 commit comments