ClassCastException that shouldn't happen
问题 Im getting a ClassCastException that shouldnt be happening. Here is the code: TwitterApplication ta = (TwitterApplication)getApplication(); OAuthProvider p = ta.getProvider(); As you see im trying to cast TwitterApplication from an Application. public class TwitterApplication extends Application { private Twitter twitter; public Twitter getTwitter(){ return this.twitter; } public void setTwitter(Twitter t){ this.twitter = t; } private OAuthProvider provider; private CommonsHttpOAuthConsumer