DBUpdateScript: add @Nullable / @NonNull annotations

This commit is contained in:
Thomas Kuehne
2026-06-01 03:43:27 +00:00
parent bd829ce33b
commit 057797c73f
@@ -1,4 +1,4 @@
/* Copyright (C) 2015-2024 Andreas Shimokawa, Carsten Pfeiffer /* Copyright (C) 2015-2026 Andreas Shimokawa, Carsten Pfeiffer, Thomas Kuehne
This file is part of Gadgetbridge. This file is part of Gadgetbridge.
@@ -18,16 +18,19 @@ package nodomain.freeyourgadget.gadgetbridge.database;
import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase;
import androidx.annotation.NonNull;
/** /**
* Interface for updating a database schema. * Interface for updating a database schema.
* Implementors provide the update from the prior schema * Implementors provide the update from the prior schema
* version to this version, and the downgrade from this schema * version to this version, and the downgrade from this schema
* version to the next lower version. * version to the next lower version.
* <p/> * <p>
* Implementations must have a public, no-arg constructor. * Implementations must have a public, no-arg constructor.
* </p>
*/ */
public interface DBUpdateScript { public interface DBUpdateScript {
void upgradeSchema(SQLiteDatabase database); void upgradeSchema(@NonNull SQLiteDatabase database);
void downgradeSchema(SQLiteDatabase database); void downgradeSchema(@NonNull SQLiteDatabase database);
} }