Vojtech Szocs has posted comments on this change. Change subject: userportal: introducing create create instance ......................................................................
Patch Set 1: Code-Review+2 (2 comments) http://gerrit.ovirt.org/#/c/27449/1/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/gin/SystemModule.java File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/gin/SystemModule.java: Line 35: void bindInfrastructure() { Line 36: bindCommonInfrastructure(UserPortalPlaceManager.class); Line 37: bind(LoggedInExtendedPlaceGatekeeper.class).in(Singleton.class); Line 38: bind(ApplicationInit.class).asEagerSingleton(); Line 39: bind(CurrentUserRole.class).to(UserPortalCurrentUserRole.class).in(Singleton.class); Please consider making BaseSystemModule.bindTypeAndImplAsSingleton method protected and using it here to allow both CurrentUserRole & UserPortalCurrentUserRole to be @Inject'ed as the same instance: bindTypeAndImplAsSingleton(CurrentUserRole.class, UserPortalCurrentUserRole.class); This way, you can @Inject UserPortalCurrentUserRole directly, which is practically the same thing as @Inject'ing CurrentUserRole. Line 40: } Line 41: Line 42: void bindConfiguration() { Line 43: bindConstant().annotatedWith(DefaultLoginSectionPlace.class) http://gerrit.ovirt.org/#/c/27449/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/SystemModule.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/gin/SystemModule.java: Line 34: bindCommonInfrastructure(WebAdminPlaceManager.class); Line 35: bind(ApplicationInit.class).asEagerSingleton(); Line 36: bind(InternalConfiguration.class).asEagerSingleton(); Line 37: bind(PostMessageDispatcher.class).asEagerSingleton(); Line 38: bind(CurrentUserRole.class).to(CommonCurrentUserRole.class).in(Singleton.class); Hm, we could do the same thing as suggested in UserPortal's SystemModule.java for consistency. Line 39: } Line 40: Line 41: void bindConfiguration() { Line 42: bindConstant().annotatedWith(DefaultLoginSectionPlace.class) -- To view, visit http://gerrit.ovirt.org/27449 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib05736665da4dbed48c9081e34e2bfeade307d1f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches