Skip to content

Commit a8cfb99

Browse files
author
Elliot Kim
committed
Suppress FindBug warnings
1 parent 33bb2b0 commit a8cfb99

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

core-api/src/test/java/com/optimizely/ab/OptimizelyTestV3.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import com.optimizely.ab.internal.ProjectValidationUtils;
3939
import com.optimizely.ab.notification.NotificationListener;
4040

41-
import org.hamcrest.Matchers;
4241
import org.junit.Rule;
4342
import org.junit.Test;
4443
import org.junit.rules.ExpectedException;
@@ -323,7 +322,6 @@ public void activateWithUnknownExperimentKeyAndRaiseExceptionErrorHandler() thro
323322
* Verify that {@link Optimizely#activate(String, String, Map)} passes through attributes.
324323
*/
325324
@Test
326-
@SuppressWarnings("unchecked")
327325
public void activateWithAttributes() throws Exception {
328326
String datafile = validConfigJsonV3();
329327
ProjectConfig projectConfig = validProjectConfigV3();
@@ -380,7 +378,6 @@ public void activateWithAttributes() throws Exception {
380378
* In this case, the activate call should remove the unknown attribute from the given map.
381379
*/
382380
@Test
383-
@SuppressWarnings("unchecked")
384381
public void activateWithUnknownAttribute() throws Exception {
385382
String datafile = validConfigJsonV3();
386383
ProjectConfig projectConfig = validProjectConfigV3();
@@ -442,7 +439,9 @@ public void activateWithUnknownAttribute() throws Exception {
442439
* Verify that {@link Optimizely#activate(String, String, Map)} ignores null attributes.
443440
*/
444441
@Test
445-
@SuppressWarnings("unchecked")
442+
@SuppressFBWarnings(
443+
value="NP_NONNULL_PARAM_VIOLATION",
444+
justification="testing nullness contract violation")
446445
public void activateWithNullAttributes() throws Exception {
447446
String datafile = noAudienceProjectConfigJsonV3();
448447
ProjectConfig projectConfig = noAudienceProjectConfigV3();
@@ -497,7 +496,6 @@ public void activateWithNullAttributes() throws Exception {
497496
* Verify that {@link Optimizely#activate(String, String, Map)} gracefully handles null attribute values.
498497
*/
499498
@Test
500-
@SuppressWarnings("unchecked")
501499
public void activateWithNullAttributeValues() throws Exception {
502500
String datafile = noAudienceProjectConfigJsonV3();
503501
ProjectConfig projectConfig = noAudienceProjectConfigV3();
@@ -880,7 +878,6 @@ public void trackEventWithUnknownEventKeyAndRaiseExceptionErrorHandler() throws
880878
* Verify that {@link Optimizely#track(String, String)} passes through attributes.
881879
*/
882880
@Test
883-
@SuppressWarnings("unchecked")
884881
public void trackEventWithAttributes() throws Exception {
885882
String datafile = validConfigJsonV3();
886883
ProjectConfig projectConfig = validProjectConfigV3();
@@ -932,7 +929,9 @@ public void trackEventWithAttributes() throws Exception {
932929
* Verify that {@link Optimizely#track(String, String)} ignores null attributes.
933930
*/
934931
@Test
935-
@SuppressWarnings("unchecked")
932+
@SuppressFBWarnings(
933+
value="NP_NONNULL_PARAM_VIOLATION",
934+
justification="testing nullness contract violation")
936935
public void trackEventWithNullAttributes() throws Exception {
937936
String datafile = noAudienceProjectConfigJsonV3();
938937
ProjectConfig projectConfig = noAudienceProjectConfigV3();
@@ -986,7 +985,6 @@ public void trackEventWithNullAttributes() throws Exception {
986985
* Verify that {@link Optimizely#track(String, String)} gracefully handles null attribute values.
987986
*/
988987
@Test
989-
@SuppressWarnings("unchecked")
990988
public void trackEventWithNullAttributesValues() throws Exception {
991989
String datafile = noAudienceProjectConfigJsonV3();
992990
ProjectConfig projectConfig = noAudienceProjectConfigV3();
@@ -1039,7 +1037,6 @@ public void trackEventWithNullAttributesValues() throws Exception {
10391037
* In this case, the track event call should remove the unknown attribute from the given map.
10401038
*/
10411039
@Test
1042-
@SuppressWarnings("unchecked")
10431040
public void trackEventWithUnknownAttribute() throws Exception {
10441041
String datafile = validConfigJsonV3();
10451042
ProjectConfig projectConfig = validProjectConfigV3();

0 commit comments

Comments
 (0)