Skip to content

Commit 8332886

Browse files
fix: Add @nullable annotation to getNotificationCenter() (#222)
1 parent 864ec84 commit 8332886

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

android-sdk/src/main/java/com/optimizely/ab/android/sdk/OptimizelyClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,11 @@ String getFeatureVariableString(@NonNull String featureKey,
546546
/**
547547
* Return the notification center {@link NotificationCenter} used to add notifications for events
548548
* such as Activate and track.
549-
* @return
549+
* @return The {@link NotificationCenter} or null if Optimizely is not initialized (or
550+
* initialization failed)
550551
*/
551-
public NotificationCenter getNotificationCenter() {
552+
public @Nullable
553+
NotificationCenter getNotificationCenter() {
552554
if (isValid()) {
553555
return optimizely.notificationCenter;
554556
} else {

0 commit comments

Comments
 (0)