Skip to content

Commit 050be36

Browse files
Use Math.max to ensure BoxStore.queryAttempts is 1 or greater.
1 parent 051b232 commit 050be36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

objectbox-java/src/main/java/io/objectbox/BoxStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public static boolean isObjectBrowserAvailable() {
243243
objectClassPublisher = new ObjectClassPublisher(this);
244244

245245
failedReadTxAttemptCallback = builder.failedReadTxAttemptCallback;
246-
queryAttempts = builder.queryAttempts < 1 ? 1 : builder.queryAttempts;
246+
queryAttempts = Math.max(builder.queryAttempts, 1);
247247
}
248248

249249
static String getCanonicalPath(File directory) {

0 commit comments

Comments
 (0)