jenkins-bot has submitted this change and it was merged.

Change subject: Regenerate test JSON
......................................................................


Regenerate test JSON

• Regenerate JSON used by most read Feed tests. d991f85 was made for
  an early version of the service. Revision IDs are no longer included.

• Remove redundant unmarshalling code in MostReadArticles. The service
  guarantees that successful responses will always have one or more
  articles.

Bug: T129082
Change-Id: Id0fd39da1d532c3884adeff6a6fe089a76844974
---
M app/src/main/java/org/wikipedia/feed/mostread/MostReadArticles.java
M app/src/test/res/raw/most_read.json
2 files changed, 44 insertions(+), 92 deletions(-)

Approvals:
  Mholloway: Looks good to me, but someone else must approve
  Dbrant: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/app/src/main/java/org/wikipedia/feed/mostread/MostReadArticles.java 
b/app/src/main/java/org/wikipedia/feed/mostread/MostReadArticles.java
index 13da633..868bd96 100644
--- a/app/src/main/java/org/wikipedia/feed/mostread/MostReadArticles.java
+++ b/app/src/main/java/org/wikipedia/feed/mostread/MostReadArticles.java
@@ -2,7 +2,6 @@
 
 import android.support.annotation.NonNull;
 
-import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -16,12 +15,5 @@
 
     @NonNull public List<MostReadArticle> articles() {
         return articles;
-    }
-
-    private MostReadArticles() {
-        //noinspection ConstantConditions
-        if (articles == null) {
-            articles = Collections.emptyList();
-        }
     }
 }
\ No newline at end of file
diff --git a/app/src/test/res/raw/most_read.json 
b/app/src/test/res/raw/most_read.json
index f80bb5d..fa2e12a 100644
--- a/app/src/test/res/raw/most_read.json
+++ b/app/src/test/res/raw/most_read.json
@@ -7,8 +7,7 @@
       "title": "Bicycle_Race",
       "pageid": 3957496,
       "normalizedtitle": "Bicycle Race",
-      "description": "rock song by Queen",
-      "revid": 723099074
+      "description": "rock song by Queen"
     },
     {
       "views": 265986,
@@ -16,8 +15,7 @@
       "title": "Dare_to_Be_Stupid_(song)",
       "pageid": 4082868,
       "normalizedtitle": "Dare to Be Stupid (song)",
-      "description": "1985 \"Weird Al\" Yankovic song",
-      "revid": 723158599
+      "description": "1985 \"Weird Al\" Yankovic song"
     },
     {
       "views": 258829,
@@ -30,8 +28,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Razak_Khan.jpg/241px-Razak_Khan.jpg";
       },
       "normalizedtitle": "Razak Khan",
-      "description": "Indian actor",
-      "revid": 724044179
+      "description": "Indian actor"
     },
     {
       "views": 201439,
@@ -44,8 +41,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Marilyn_Monroe_in_1952.jpg/229px-Marilyn_Monroe_in_1952.jpg";
       },
       "normalizedtitle": "Marilyn Monroe",
-      "description": "American actress, model, and singer",
-      "revid": 724154013
+      "description": "American actress, model, and singer"
     },
     {
       "views": 184527,
@@ -53,8 +49,7 @@
       "title": "Het_Klokhuis",
       "pageid": 3118503,
       "normalizedtitle": "Het Klokhuis",
-      "description": "Dutch educational show",
-      "revid": 723880486
+      "description": "Dutch educational show"
     },
     {
       "views": 176512,
@@ -67,8 +62,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/en/thumb/b/b5/Big_trouble_ver2.jpg/217px-Big_trouble_ver2.jpg";
       },
       "normalizedtitle": "Big Trouble (2002 film)",
-      "description": "2002 American comedy film",
-      "revid": 718183639
+      "description": "2002 American comedy film"
     },
     {
       "views": 136099,
@@ -81,8 +75,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/9/98/Englefield_House_-_geograph.org.uk_-_1824880.jpg/320px-Englefield_House_-_geograph.org.uk_-_1824880.jpg";
       },
       "normalizedtitle": "X-Men: Apocalypse",
-      "description": "2016 superhero film",
-      "revid": 724164773
+      "description": "2016 superhero film"
     },
     {
       "views": 125269,
@@ -95,8 +88,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/20141120_gotthard-basistunnel02-wikipedia-hannes-ortlieb.jpg/320px-20141120_gotthard-basistunnel02-wikipedia-hannes-ortlieb.jpg";
       },
       "normalizedtitle": "Gotthard Base Tunnel",
-      "description": "railway tunnel through the Swiss Alps",
-      "revid": 724186485
+      "description": "railway tunnel through the Swiss Alps"
     },
     {
       "views": 116784,
@@ -109,8 +101,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/UEFA_Euro_2016_qualifying_map.svg/320px-UEFA_Euro_2016_qualifying_map.svg.png";
       },
       "normalizedtitle": "UEFA Euro 2016",
-      "description": "football tournament held in 2016",
-      "revid": 724190122
+      "description": "football tournament held in 2016"
     },
     {
       "views": 98366,
@@ -123,8 +114,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/IJzeren_voetring_voor_gevangenen_transparent_background.png/320px-IJzeren_voetring_voor_gevangenen_transparent_background.png";
       },
       "normalizedtitle": "Kunta Kinte",
-      "description": "From Alex Haley's ''Roots''",
-      "revid": 724163180
+      "description": "From Alex Haley's ''Roots''"
     },
     {
       "views": 96331,
@@ -132,8 +122,7 @@
       "title": "98.6_(disambiguation)",
       "pageid": 12124572,
       "normalizedtitle": "98.6 (disambiguation)",
-      "description": "Wikipedia disambiguation page",
-      "revid": 635924234
+      "description": "Wikipedia disambiguation page"
     },
     {
       "views": 92076,
@@ -141,8 +130,7 @@
       "title": "Deaths_in_2016",
       "pageid": 48857868,
       "normalizedtitle": "Deaths in 2016",
-      "description": "Wikimedia list article",
-      "revid": 724193677
+      "description": "Wikimedia list article"
     },
     {
       "views": 88800,
@@ -155,8 +143,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Amber_Heard_2011.jpg/231px-Amber_Heard_2011.jpg";
       },
       "normalizedtitle": "Amber Heard",
-      "description": "American actress",
-      "revid": 724146684
+      "description": "American actress"
     },
     {
       "views": 86325,
@@ -169,8 +156,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Castillo_de_Zafra_-_Exterior.JPG/320px-Castillo_de_Zafra_-_Exterior.JPG";
       },
       "normalizedtitle": "Game of Thrones (season 6)",
-      "description": "sixth season of the fantasy drama television series Game 
of Thrones",
-      "revid": 724188750
+      "description": "sixth season of the fantasy drama television series Game 
of Thrones"
     },
     {
       "views": 77042,
@@ -178,8 +164,7 @@
       "title": "Roots_(2016_miniseries)",
       "pageid": 49403994,
       "normalizedtitle": "Roots (2016 miniseries)",
-      "description": "2016 miniseries",
-      "revid": 724090522
+      "description": "2016 miniseries"
     },
     {
       "views": 75046,
@@ -192,16 +177,14 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Game_of_Thrones_Oslo_exhibition_2014_-_Weapons.jpg/320px-Game_of_Thrones_Oslo_exhibition_2014_-_Weapons.jpg";
       },
       "normalizedtitle": "Game of Thrones",
-      "description": "American fantasy drama television series",
-      "revid": 724159123
+      "description": "American fantasy drama television series"
     },
     {
       "views": 72363,
       "rank": 23,
       "title": "Roots_(miniseries)",
       "pageid": 50676323,
-      "normalizedtitle": "Roots (miniseries)",
-      "revid": 722977223
+      "normalizedtitle": "Roots (miniseries)"
     },
     {
       "views": 69446,
@@ -214,8 +197,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/8/8e/Cast_of_Captain_America_Civil_War.jpg/320px-Cast_of_Captain_America_Civil_War.jpg";
       },
       "normalizedtitle": "Captain America: Civil War",
-      "description": "2016 superhero film produced by Marvel Studios",
-      "revid": 724185751
+      "description": "2016 superhero film produced by Marvel Studios"
     },
     {
       "views": 66186,
@@ -223,8 +205,7 @@
       "title": "Dread_Pirate_Roberts",
       "pageid": 592069,
       "normalizedtitle": "Dread Pirate Roberts",
-      "description": "fictional pirate",
-      "revid": 723725070
+      "description": "fictional pirate"
     },
     {
       "views": 65737,
@@ -236,8 +217,7 @@
         "120": 
"http://upload.wikimedia.org/wikipedia/en/thumb/e/e8/First_State_of_Origin_Shield.jpg/120px-First_State_of_Origin_Shield.jpg";,
         "320": 
"http://upload.wikimedia.org/wikipedia/en/thumb/e/e8/First_State_of_Origin_Shield.jpg/301px-First_State_of_Origin_Shield.jpg";
       },
-      "normalizedtitle": "State of Origin series",
-      "revid": 723953814
+      "normalizedtitle": "State of Origin series"
     },
     {
       "views": 65675,
@@ -250,8 +230,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Male_gorilla_in_SF_zoo.jpg/287px-Male_gorilla_in_SF_zoo.jpg";
       },
       "normalizedtitle": "Gorilla",
-      "description": "genus of mammals",
-      "revid": 723875732
+      "description": "genus of mammals"
     },
     {
       "views": 62510,
@@ -264,8 +243,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Stephen_Curry_dribbling_2016_%28cropped%29.jpg/178px-Stephen_Curry_dribbling_2016_%28cropped%29.jpg";
       },
       "normalizedtitle": "Stephen Curry",
-      "description": "American basketball player",
-      "revid": 724183299
+      "description": "American basketball player"
     },
     {
       "views": 62441,
@@ -278,8 +256,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Maya_Rudolph.jpg/318px-Maya_Rudolph.jpg";
       },
       "normalizedtitle": "Maya Rudolph",
-      "description": "American comedic actress",
-      "revid": 723982649
+      "description": "American comedic actress"
     },
     {
       "views": 62315,
@@ -292,8 +269,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/JohnnyDeppHWOFJune2013.jpg/273px-JohnnyDeppHWOFJune2013.jpg";
       },
       "normalizedtitle": "Johnny Depp",
-      "description": "American actor, film producer, and musician",
-      "revid": 723602532
+      "description": "American actor, film producer, and musician"
     },
     {
       "views": 61229,
@@ -306,8 +282,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Donald_Trump_August_19%2C_2015_%28cropped%29.jpg/235px-Donald_Trump_August_19%2C_2015_%28cropped%29.jpg";
       },
       "normalizedtitle": "Donald Trump",
-      "description": "American business magnate, television personality, 
author and politician",
-      "revid": 724184974
+      "description": "American business magnate, television personality, 
author and politician"
     },
     {
       "views": 60341,
@@ -320,8 +295,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Wikipedia_Children%27s_Day.png/320px-Wikipedia_Children%27s_Day.png";
       },
       "normalizedtitle": "Children's Day",
-      "description": "day to honor children globally",
-      "revid": 724017404
+      "description": "day to honor children globally"
     },
     {
       "views": 58134,
@@ -334,8 +308,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Louis_XIV_of_France.jpg/225px-Louis_XIV_of_France.jpg";
       },
       "normalizedtitle": "Louis XIV of France",
-      "description": "King of France and Navarra, from 1643 to 1715",
-      "revid": 723951853
+      "description": "King of France and Navarra, from 1643 to 1715"
     },
     {
       "views": 56939,
@@ -343,8 +316,7 @@
       "title": "X-Men_(film_series)",
       "pageid": 11891433,
       "normalizedtitle": "X-Men (film series)",
-      "description": "film series",
-      "revid": 724119564
+      "description": "film series"
     },
     {
       "views": 55852,
@@ -352,8 +324,7 @@
       "title": "Michael_Jace",
       "pageid": 4238332,
       "normalizedtitle": "Michael Jace",
-      "description": "American actor",
-      "revid": 723735020
+      "description": "American actor"
     },
     {
       "views": 54683,
@@ -361,8 +332,7 @@
       "title": "List_of_Bollywood_films_of_2016",
       "pageid": 44953417,
       "normalizedtitle": "List of Bollywood films of 2016",
-      "description": "Wikimedia list article",
-      "revid": 724127521
+      "description": "Wikimedia list article"
     },
     {
       "views": 54645,
@@ -375,8 +345,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Person_of_Interest_logo.svg/320px-Person_of_Interest_logo.svg.png";
       },
       "normalizedtitle": "List of Person of Interest episodes",
-      "description": "Wikimedia list article",
-      "revid": 724194257
+      "description": "Wikimedia list article"
     },
     {
       "views": 53441,
@@ -384,8 +353,7 @@
       "title": "Stoner_(novel)",
       "pageid": 21337639,
       "normalizedtitle": "Stoner (novel)",
-      "description": "1965 novel by the American writer John Williams",
-      "revid": 724135033
+      "description": "1965 novel by the American writer John Williams"
     },
     {
       "views": 52457,
@@ -393,8 +361,7 @@
       "title": "Warcraft_(film)",
       "pageid": 39701440,
       "normalizedtitle": "Warcraft (film)",
-      "description": "2016 film",
-      "revid": 724199844
+      "description": "2016 film"
     },
     {
       "views": 51324,
@@ -407,8 +374,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Center_building_at_Saint_Elizabeths%2C_August_23%2C_2006.jpg/320px-Center_building_at_Saint_Elizabeths%2C_August_23%2C_2006.jpg";
       },
       "normalizedtitle": "Rosenhan experiment",
-      "description": "psychological experiment",
-      "revid": 724062952
+      "description": "psychological experiment"
     },
     {
       "views": 51299,
@@ -416,13 +382,12 @@
       "title": "Emilia_Clarke",
       "pageid": 30175038,
       "thumbnail": {
-        "60": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Emilia_Clarke_by_Gage_Skidmore_2.jpg/60px-Emilia_Clarke_by_Gage_Skidmore_2.jpg";,
-        "120": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Emilia_Clarke_by_Gage_Skidmore_2.jpg/120px-Emilia_Clarke_by_Gage_Skidmore_2.jpg";,
-        "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Emilia_Clarke_by_Gage_Skidmore_2.jpg/260px-Emilia_Clarke_by_Gage_Skidmore_2.jpg";
+        "60": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Emilia_Clarke_2013_%28Straighten_Colors_2%29.jpg/60px-Emilia_Clarke_2013_%28Straighten_Colors_2%29.jpg";,
+        "120": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Emilia_Clarke_2013_%28Straighten_Colors_2%29.jpg/120px-Emilia_Clarke_2013_%28Straighten_Colors_2%29.jpg";,
+        "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Emilia_Clarke_2013_%28Straighten_Colors_2%29.jpg/239px-Emilia_Clarke_2013_%28Straighten_Colors_2%29.jpg";
       },
       "normalizedtitle": "Emilia Clarke",
-      "description": "English actress",
-      "revid": 724105467
+      "description": "English actress"
     },
     {
       "views": 50895,
@@ -435,8 +400,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Elizabeth_Holmes_2014_%28cropped%29.jpg/277px-Elizabeth_Holmes_2014_%28cropped%29.jpg";
       },
       "normalizedtitle": "Elizabeth Holmes",
-      "description": "American business executive",
-      "revid": 723952023
+      "description": "American business executive"
     },
     {
       "views": 50728,
@@ -449,16 +413,14 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Stephen_Hawking.StarChild.jpg/223px-Stephen_Hawking.StarChild.jpg";
       },
       "normalizedtitle": "Stephen Hawking",
-      "description": "British theoretical physicist, cosmologist, and author",
-      "revid": 723279616
+      "description": "British theoretical physicist, cosmologist, and author"
     },
     {
       "views": 50408,
       "rank": 48,
       "title": "Harry_Potter_and_the_Cursed_Child",
       "pageid": 47083555,
-      "normalizedtitle": "Harry Potter and the Cursed Child",
-      "revid": 723686885
+      "normalizedtitle": "Harry Potter and the Cursed Child"
     },
     {
       "views": 49764,
@@ -471,8 +433,7 @@
         "320": 
"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Campaign_road_sign_against_female_genital_mutilation_%28cropped%29_2.jpg/320px-Campaign_road_sign_against_female_genital_mutilation_%28cropped%29_2.jpg";
       },
       "normalizedtitle": "Female genital mutilation",
-      "description": "controversial cultural ritual",
-      "revid": 722859562
+      "description": "controversial cultural ritual"
     },
     {
       "views": 49670,
@@ -480,8 +441,7 @@
       "title": "June_1",
       "pageid": 15856,
       "normalizedtitle": "June 1",
-      "description": "date",
-      "revid": 723445693
+      "description": "date"
     }
   ]
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/293572
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0fd39da1d532c3884adeff6a6fe089a76844974
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to