File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
app/src/test/java/com/test/onesignal
onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -754,6 +754,12 @@ public void testGetTagsWithNoTagsShouldBeNull() throws Exception {
754
754
Assert .assertNull (lastGetTags );
755
755
}
756
756
757
+ @ Test
758
+ public void testGetTagNullCheck () throws Exception {
759
+ OneSignalInit ();
760
+ OneSignal .getTags (null );
761
+ }
762
+
757
763
@ Test
758
764
public void shouldGetTags () throws Exception {
759
765
OneSignalInit ();
Original file line number Diff line number Diff line change @@ -734,6 +734,10 @@ public static void getTags(final GetTagsHandler getTagsHandler) {
734
734
Log (LOG_LEVEL .ERROR , "You must initialize OneSignal before getting tags! Omitting this tag operation." );
735
735
return ;
736
736
}
737
+ if (getTagsHandler == null ) {
738
+ Log (LOG_LEVEL .ERROR , "getTagsHandler is null!" );
739
+ return ;
740
+ }
737
741
738
742
JSONObject tags = OneSignalStateSynchronizer .getTags ();
739
743
if (tags == null || tags .toString ().equals ("{}" ))
You can’t perform that action at this time.
0 commit comments