@@ -139,12 +139,6 @@ public static String getVersionNative() {
139139 */
140140 public static native void testUnalignedMemoryAccess ();
141141
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-
148142 /**
149143 * Creates a native BoxStore instance with FlatBuffer {@link io.objectbox.model.FlatStoreOptions} {@code options}
150144 * and a {@link ModelBuilder} {@code model}. Returns the handle of the native store instance.
@@ -234,7 +228,6 @@ public static boolean isObjectBrowserAvailable() {
234228 handle = nativeCreateWithFlatOptions (buildFlatStoreOptions (builder , canonicalPath ), builder .model );
235229 int debugFlags = builder .debugFlags ;
236230 if (debugFlags != 0 ) {
237- nativeSetDebugFlags (handle , debugFlags );
238231 debugTxRead = (debugFlags & DebugFlags .LOG_TRANSACTIONS_READ ) != 0 ;
239232 debugTxWrite = (debugFlags & DebugFlags .LOG_TRANSACTIONS_WRITE ) != 0 ;
240233 } else {
@@ -289,17 +282,20 @@ private byte[] buildFlatStoreOptions(BoxStoreBuilder builder, String canonicalPa
289282 FlatStoreOptions .addDirectoryPath (fbb , directoryPathOffset );
290283 FlatStoreOptions .addMaxDbSizeInKByte (fbb , builder .maxSizeInKByte );
291284 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 );
301291 }
302292 }
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+ }
303299
304300 int offset = FlatStoreOptions .endFlatStoreOptions (fbb );
305301 fbb .finish (offset );
0 commit comments