From 057797c73f53e034cdba605a15221c3992e16bba Mon Sep 17 00:00:00 2001 From: Thomas Kuehne Date: Mon, 1 Jun 2026 03:43:27 +0000 Subject: [PATCH] DBUpdateScript: add @Nullable / @NonNull annotations --- .../gadgetbridge/database/DBUpdateScript.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBUpdateScript.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBUpdateScript.java index 3dc394034c..c0fc151dee 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBUpdateScript.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBUpdateScript.java @@ -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. @@ -18,16 +18,19 @@ package nodomain.freeyourgadget.gadgetbridge.database; import android.database.sqlite.SQLiteDatabase; +import androidx.annotation.NonNull; + /** * Interface for updating a database schema. * Implementors provide the update from the prior schema * version to this version, and the downgrade from this schema * version to the next lower version. - *

+ *

* Implementations must have a public, no-arg constructor. + *

*/ public interface DBUpdateScript { - void upgradeSchema(SQLiteDatabase database); + void upgradeSchema(@NonNull SQLiteDatabase database); - void downgradeSchema(SQLiteDatabase database); + void downgradeSchema(@NonNull SQLiteDatabase database); }