In my Android project I have made an abstract AsyncTask class in which I input the URL and if needed paging information so I don\'t need to keep writing the HTTP stuff etc.<
You cannot do it without a warning. You are casting an Object to some other class, and even if the Object is an instance of ArrayList you don't know it's generic type.
Update:
if you wrote SuperCoolAsyncTask yourself, you could parametrize the class with generics:
public abstract class SuperCoolAsyncTask {
protected abstract void onAsyncTaskResult(ResultType o);
}
And then, when you invoke your code:
new SuperCoolAsyncTask>() {
@Override
protected void onAsyncTaskResult(ArrayList o) {
AppConstants.scoreStatistics = o;
}
}.execute(get_url_score_statistics());