Make SpotBugs happy

This commit is contained in:
Sylvia van Os
2021-07-25 21:51:46 +02:00
parent 19afe8e69c
commit 8472bc9755
2 changed files with 7 additions and 3 deletions

View File

@@ -637,7 +637,11 @@ public class LoyaltyCardEditActivity extends AppCompatActivity
colors.recycle();
}
thumbnail.setOnClickListener(new ColorSelectListener(tempLoyaltyCard.headerColor));
// It can't be null because we set it in updateTempState but SpotBugs insists it can be
// NP_NULL_ON_SOME_PATH: Possible null pointer dereference
if(tempLoyaltyCard.headerColor != null) {
thumbnail.setOnClickListener(new ColorSelectListener(tempLoyaltyCard.headerColor));
}
// Update from intent
if (barcodeType != null) {