From 029cbaebb9ae0c1ef8596f56101e59984a71d64f Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 17 Mar 2017 12:34:19 +0000 Subject: Remove ambiguous wildcard import of org.mockito.Matchers.* The recent upgrade to Mockito 2.7.13 has caused some problems for grok (and new javac toolchain). The changed files used wildcard imports to import the same methods from both Matchers and Mockito. This was not a problem previously because in the previous version of Mockito the Mockito class extended the Matchers class and so even though two methods with the same name were imported they were not treated as a conflict because they were treated as being the same method. In 2.7.13 the Mockito class no longer extends the Matchers class instead they both extend the ArgumentMatchers class and so for some reason javac no longer treats them as the same method. This was not detected by presubmit builds because jack is still treating the methods as being the same. Bug: 32912773 Test: m -j32 ANDROID_FORCE_JACK_ENABLED=disabled FrameworksWifiTests Change-Id: I4f505b2b0450e14a65ff3a6ba2dc7b3583592047 --- tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java | 1 - tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java | 1 - .../src/com/android/server/wifi/scanner/WifiScanningServiceTest.java | 1 - 3 files changed, 3 deletions(-) diff --git a/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java index d0aa6ffae..c7b6180d4 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiControllerTest.java @@ -27,7 +27,6 @@ import static com.android.server.wifi.WifiController.CMD_SET_AP; import static com.android.server.wifi.WifiController.CMD_WIFI_TOGGLED; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import android.content.ContentResolver; diff --git a/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java index 1bbdda981..d5d79b831 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java @@ -18,7 +18,6 @@ package com.android.server.wifi; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.*; -import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import android.content.Context; diff --git a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java index 738318c8e..02cb633d0 100644 --- a/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java +++ b/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java @@ -19,7 +19,6 @@ package com.android.server.wifi.scanner; import static com.android.server.wifi.ScanTestUtil.*; import static org.junit.Assert.*; -import static org.mockito.Matchers.*; import static org.mockito.Mockito.*; import android.app.test.MockAnswerUtil.AnswerWithArguments; -- cgit v1.2.3