Using Generics in an Ugly Way
Previously I was talking about generics. You can see how I do with generics to the confusing level:
new AsyncTask<Void, Void, RefreshTaskResult<ActionResult<List<SquadInfoShort>>>>() { protected RefreshTaskResult<ActionResult<List<SquadInfoShort>>> doInBackground(Void... params) { try { ActionResult<List<SquadInfoShort>> result = client.getSquadList(); return new RefreshTaskResult<ActionResult<List<SquadInfoShort>>>(result); } catch (Exception e) { // Catch any exception return new RefreshTaskResult<ActionResult<List<SquadInfoShort>>>(e); } } }.execute();
See how many < > to feast your eyes.