Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also fix singleton config for core module #3061

Merged
merged 5 commits into from
Aug 13, 2019

Conversation

christophsturm
Copy link
Contributor

follow up to #3058 that converts the core module too.
and unit test it all

Copy link

@blabno blabno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good.
I see pros and cons in both approaches. Just as forgetting to configure class as singleton in a module you can forget about annotating the class. Defining life cycle inside module allows for class reuse in different context, but that's very theoretical benefit.

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the missing singleton

@@ -118,15 +84,6 @@ protected void configure() {
String referralId = environment.getProperty(AppOptionKeys.REFERRAL_ID, String.class, "");
bind(String.class).annotatedWith(Names.named(AppOptionKeys.REFERRAL_ID)).toInstance(referralId);

bind(MobileNotificationService.class).in(Singleton.class);
bind(MobileMessageEncryption.class).in(Singleton.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MobileMessageEncryption doesn't have singleton annotation and not tested in GuiceSetupTest.java

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@sqrrm sqrrm merged commit 3cfe510 into bisq-network:master Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants