Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@App in @EBean is Null #481

Description

@cyzgbw

I used an @app in @ebean,but it's Null.
I read the code:

public static HttpUtil_ getInstance_(Context context) {
if (instance_ == null) {
instance_ = new HttpUtil_(context.getApplicationContext());//here used activity's application
}
return instance_;
}

private HttpUtil_(Context context) {
context_ = context;
init_();
}

private void init_() {
if (context_ instanceof Activity) {//but here,the context is application,not activity. so the application is null;
Activity activity = ((Activity) context_);
application = ((SoApplication) activity.getApplication());
}
loginInfo = new LoginInfo_(context_);
}

Activity

  1. mathieuboniface commented on Jan 30, 2013

    @mathieuboniface
    Contributor

    Hi @cyzgbw :)

    Thank you for reporting issue on AA.

    There is an open issue on that subjcect, please have a look to #228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions