Skip to content

Commit 5248f14

Browse files
committed
Remove excessive logging
1 parent d870088 commit 5248f14

File tree

1 file changed

+4
-2
lines changed
  • core-sdk-samples/higgs-shop-sample-app/app/src/main/kotlin/com/mparticle/example/higgsshopsampleapp/repositories

1 file changed

+4
-2
lines changed

core-sdk-samples/higgs-shop-sample-app/app/src/main/kotlin/com/mparticle/example/higgsshopsampleapp/repositories/ProductsRepository.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ class ProductsRepository() {
2222

2323
fun getProducts(context: Context) : List<Product> {
2424
val jsonFileString = getJsonDataFromAsset(context, "products.json")
25-
Log.i(TAG, jsonFileString ?: "Could not find local products.json")
25+
if (jsonFileString.isNullOrBlank()) {
26+
Log.e(TAG, "Could not find local products.json")
27+
}
2628
val listProductType = object : TypeToken<Products>() {}.type
27-
var products: Products = Gson().fromJson(jsonFileString, listProductType)
29+
val products: Products = Gson().fromJson(jsonFileString, listProductType)
2830
return products.products
2931
}
3032

0 commit comments

Comments
 (0)