|
38 | 38 | import com.optimizely.ab.internal.ProjectValidationUtils; |
39 | 39 | import com.optimizely.ab.notification.NotificationListener; |
40 | 40 |
|
41 | | -import org.hamcrest.Matchers; |
42 | 41 | import org.junit.Rule; |
43 | 42 | import org.junit.Test; |
44 | 43 | import org.junit.rules.ExpectedException; |
@@ -323,7 +322,6 @@ public void activateWithUnknownExperimentKeyAndRaiseExceptionErrorHandler() thro |
323 | 322 | * Verify that {@link Optimizely#activate(String, String, Map)} passes through attributes. |
324 | 323 | */ |
325 | 324 | @Test |
326 | | - @SuppressWarnings("unchecked") |
327 | 325 | public void activateWithAttributes() throws Exception { |
328 | 326 | String datafile = validConfigJsonV3(); |
329 | 327 | ProjectConfig projectConfig = validProjectConfigV3(); |
@@ -380,7 +378,6 @@ public void activateWithAttributes() throws Exception { |
380 | 378 | * In this case, the activate call should remove the unknown attribute from the given map. |
381 | 379 | */ |
382 | 380 | @Test |
383 | | - @SuppressWarnings("unchecked") |
384 | 381 | public void activateWithUnknownAttribute() throws Exception { |
385 | 382 | String datafile = validConfigJsonV3(); |
386 | 383 | ProjectConfig projectConfig = validProjectConfigV3(); |
@@ -442,7 +439,9 @@ public void activateWithUnknownAttribute() throws Exception { |
442 | 439 | * Verify that {@link Optimizely#activate(String, String, Map)} ignores null attributes. |
443 | 440 | */ |
444 | 441 | @Test |
445 | | - @SuppressWarnings("unchecked") |
| 442 | + @SuppressFBWarnings( |
| 443 | + value="NP_NONNULL_PARAM_VIOLATION", |
| 444 | + justification="testing nullness contract violation") |
446 | 445 | public void activateWithNullAttributes() throws Exception { |
447 | 446 | String datafile = noAudienceProjectConfigJsonV3(); |
448 | 447 | ProjectConfig projectConfig = noAudienceProjectConfigV3(); |
@@ -497,7 +496,6 @@ public void activateWithNullAttributes() throws Exception { |
497 | 496 | * Verify that {@link Optimizely#activate(String, String, Map)} gracefully handles null attribute values. |
498 | 497 | */ |
499 | 498 | @Test |
500 | | - @SuppressWarnings("unchecked") |
501 | 499 | public void activateWithNullAttributeValues() throws Exception { |
502 | 500 | String datafile = noAudienceProjectConfigJsonV3(); |
503 | 501 | ProjectConfig projectConfig = noAudienceProjectConfigV3(); |
@@ -880,7 +878,6 @@ public void trackEventWithUnknownEventKeyAndRaiseExceptionErrorHandler() throws |
880 | 878 | * Verify that {@link Optimizely#track(String, String)} passes through attributes. |
881 | 879 | */ |
882 | 880 | @Test |
883 | | - @SuppressWarnings("unchecked") |
884 | 881 | public void trackEventWithAttributes() throws Exception { |
885 | 882 | String datafile = validConfigJsonV3(); |
886 | 883 | ProjectConfig projectConfig = validProjectConfigV3(); |
@@ -932,7 +929,9 @@ public void trackEventWithAttributes() throws Exception { |
932 | 929 | * Verify that {@link Optimizely#track(String, String)} ignores null attributes. |
933 | 930 | */ |
934 | 931 | @Test |
935 | | - @SuppressWarnings("unchecked") |
| 932 | + @SuppressFBWarnings( |
| 933 | + value="NP_NONNULL_PARAM_VIOLATION", |
| 934 | + justification="testing nullness contract violation") |
936 | 935 | public void trackEventWithNullAttributes() throws Exception { |
937 | 936 | String datafile = noAudienceProjectConfigJsonV3(); |
938 | 937 | ProjectConfig projectConfig = noAudienceProjectConfigV3(); |
@@ -986,7 +985,6 @@ public void trackEventWithNullAttributes() throws Exception { |
986 | 985 | * Verify that {@link Optimizely#track(String, String)} gracefully handles null attribute values. |
987 | 986 | */ |
988 | 987 | @Test |
989 | | - @SuppressWarnings("unchecked") |
990 | 988 | public void trackEventWithNullAttributesValues() throws Exception { |
991 | 989 | String datafile = noAudienceProjectConfigJsonV3(); |
992 | 990 | ProjectConfig projectConfig = noAudienceProjectConfigV3(); |
@@ -1039,7 +1037,6 @@ public void trackEventWithNullAttributesValues() throws Exception { |
1039 | 1037 | * In this case, the track event call should remove the unknown attribute from the given map. |
1040 | 1038 | */ |
1041 | 1039 | @Test |
1042 | | - @SuppressWarnings("unchecked") |
1043 | 1040 | public void trackEventWithUnknownAttribute() throws Exception { |
1044 | 1041 | String datafile = validConfigJsonV3(); |
1045 | 1042 | ProjectConfig projectConfig = validProjectConfigV3(); |
|
0 commit comments