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

Conversation

@Artyomcool
Copy link

Hi,

Fixes Issue #770 by splitting constructor and initialization for singletons.

@DayS
Copy link
Contributor

DayS commented Nov 22, 2013

Simple and it works just fine. Great job 👍
Could you just add a unit test for this : Add two cyclic singleton bean in functional-test-1-5 project and add this test in functional-test-1-5-test :

@Test
public void cyclic_singleton() {
    EmptyActivityWithoutLayout_ context = new EmptyActivityWithoutLayout_();
    SomeCyclicSingletonA_ singletonA = SomeCyclicSingletonA_.getInstance_(context);
    SomeCyclicSingletonB_ singletonB = SomeCyclicSingletonB_.getInstance_(context);
    assertThat(singletonA.singletonB).isSameAs(singletonB);
}

@Artyomcool
Copy link
Author

Of cource, just give me a day :)

@Artyomcool
Copy link
Author

Is it ok?

DayS added a commit that referenced this pull request Nov 27, 2013
fix: StackOverflowError for singleton scope
@DayS DayS merged commit 9f42f5a into androidannotations:develop Nov 27, 2013
@DayS
Copy link
Contributor

DayS commented Nov 27, 2013

Perfect 👍

@mserioli
Copy link

Hi.

I'm having this issue and I'm using android annotations 2.7.1 in a maven project.

Sorry for stupid question.. but how can I get the version that solve this bug? In which version is it solved?

Thank you very much.

@DayS
Copy link
Contributor

DayS commented Dec 17, 2013

As you can see on related issue #770 this fix will be solved in 3.0 which should be release soon.

@mserioli
Copy link

But if I need it VERY soon :)

If I want to use a non-release verison, but the current milestone?

2013/12/17 Damien notifications@github.com

As you can see on related issue #770https://github.com/excilys/androidannotations/issues/770this fix will be solved in 3.0 which should be release soon.


Reply to this email directly or view it on GitHubhttps://github.com//pull/792#issuecomment-30748135
.

@DayS
Copy link
Contributor

DayS commented Dec 17, 2013

The best way is to just solve the cyclic dependency by removing automatic injection in one of your bean and manually inject resources from Application.onCreate

@mserioli
Copy link

Ok, I will do in this way waiting for new release 3.

Thank you!

2013/12/17 Damien notifications@github.com

The best way is to just solve the cyclic dependency by removing automatic
injection in one of your bean and manually inject resources from
Application.onCreate


Reply to this email directly or view it on GitHubhttps://github.com//pull/792#issuecomment-30748617
.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants