Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

fix: StackOverflowError for singleton scope#792

Merged
DayS merged 2 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
Artyomcool:singleton-circular-referenceArtyomcool/androidannotations:singleton-circular-referenceCopy head branch name to clipboard
Nov 27, 2013
Merged

fix: StackOverflowError for singleton scope#792
DayS merged 2 commits into
androidannotations:developandroidannotations/androidannotations:developfrom
Artyomcool:singleton-circular-referenceArtyomcool/androidannotations:singleton-circular-referenceCopy head branch name to clipboard

Conversation

@Artyomcool

Copy link
Copy Markdown

Hi,

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

@DayS

DayS commented Nov 22, 2013

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Author

Of cource, just give me a day :)

@Artyomcool

Copy link
Copy Markdown
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

DayS commented Nov 27, 2013

Copy link
Copy Markdown
Contributor

Perfect 👍

@mserioli

Copy link
Copy Markdown

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

DayS commented Dec 17, 2013

Copy link
Copy Markdown
Contributor

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

@mserioli

Copy link
Copy Markdown

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

DayS commented Dec 17, 2013

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.