Skip to content

Commit c62209b

Browse files
QueryBuilder: resolve warnings.
1 parent d93fa5f commit c62209b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

objectbox-java/src/main/java/io/objectbox/query/QueryBuilder.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import io.objectbox.annotation.apihint.Internal;
2929
import io.objectbox.relation.RelationInfo;
3030

31+
import javax.annotation.Nullable;
32+
3133
/**
3234
* With QueryBuilder you define custom queries returning matching entities. Using the methods of this class you can
3335
* select (filter) results for specific data (for example #{@link #equal(Property, String)} and
@@ -188,6 +190,10 @@ private QueryBuilder(long storeHandle, long subQueryBuilderHandle) {
188190
isSubQuery = true;
189191
}
190192

193+
/**
194+
* Explicitly call {@link #close()} instead.
195+
*/
196+
@SuppressWarnings("deprecation") // finalize()
191197
@Override
192198
protected void finalize() throws Throwable {
193199
close();
@@ -365,7 +371,7 @@ public QueryBuilder<T> eager(RelationInfo relationInfo, RelationInfo... more) {
365371
* @param relationInfo The relation as found in the generated meta info class ("EntityName_") of class T.
366372
* @param more Supply further relations to be eagerly loaded.
367373
*/
368-
public QueryBuilder<T> eager(int limit, RelationInfo relationInfo, RelationInfo... more) {
374+
public QueryBuilder<T> eager(int limit, RelationInfo relationInfo, @Nullable RelationInfo... more) {
369375
verifyNotSubQuery();
370376
if (eagerRelations == null) {
371377
eagerRelations = new ArrayList<>();

0 commit comments

Comments
 (0)