Skip to content

Commit 6cc1d05

Browse files
committed
Analysis: Resolve name shadowed ui test warning
Warning Message: "Name shadowed: xyz" Also, as part of this commit, a couple of other minor warnings got resolved too.
1 parent f36f063 commit 6cc1d05

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

WordPress/src/androidTest/java/org/wordpress/android/util/StatsMocksReader.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ import org.json.JSONObject
55
import java.util.ArrayList
66

77
class StatsMocksReader {
8-
fun readDayStatsGenericFile(fileName: String, lastObjectName: String, keyName: String, valueName: String):
8+
private fun readDayStatsGenericFile(fileName: String, lastObjectName: String, keyName: String, valueName: String):
99
MutableList<StatsKeyValueData> {
10-
val fileName = "mocks/mappings/wpcom/stats/$fileName.json"
1110
val todayMarker = "{{now format='yyyy-MM-dd'}}"
12-
val readString = this.readAssetsFile(fileName)
11+
val readString = this.readAssetsFile("mocks/mappings/wpcom/stats/$fileName.json")
1312
val wireMockJSON = JSONObject(readString)
1413
val arrayRaw = wireMockJSON
1514
.getJSONObject("response")
@@ -58,7 +57,7 @@ class StatsMocksReader {
5857
}
5958

6059
fun readDayCountriesToList(): MutableList<StatsKeyValueData> {
61-
var countriesList = readDayStatsGenericFile(
60+
val countriesList = readDayStatsGenericFile(
6261
"stats_country-views-day", "views", "country_code", "views"
6362
)
6463

0 commit comments

Comments
 (0)