On Thu, Aug 11, 2011 at 9:21 AM, Zsolt Vasvari <[email protected]> wrote:
> That might work, though I cringe how bad an OO practice it is to
> define something as the concrete class when the interface would
> suffice. Not that my opinion on OO practices really matter.
Well, internally you would be using the interface, so it's not *that* bad:
public class MyAsyncTask extends AsyncTask<...> {
private Context context;
public MyAsyncTask(Application app) {
this.context = app;
....
}
> I have the same issue, BTW, with some of the built-in Collection
> classes. I have, at least, half dozen times, encountered issue where
> I tried to modify a collection returned by Collections.singletonList()
> and got an UnsupportedOperationException thrown in my face.
>
UnsupportedOperationException is a bit of hack indeed.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en