1. Java / Говнокод #24274

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    if (context instanceof Activity) {
                activity = (MainActivityMVI) context;
                try {
                    listener = (OnOfferItemClickListenerS) activity;
                } catch (ClassCastException e) {
                    throw new ClassCastException(activity.toString() + "must implement OnOfferItemClickListenerS");
                }
                try {
                    listener2 = (OnLoadDataSearchMainFragmentListener) activity;
                } catch (ClassCastException e) {
                    throw new ClassCastException(activity.toString() + "must implement OnLoadDataSearchMainFragmentListener");
                }
                App.getComponent(activity).inject(this);
            }

    Запостил: makesense, 16 Мая 2018

    Комментарии (53) RSS

    Добавить комментарий