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

CDI support can fail due to Set.toString() used as Map key [DATASOLR-276] #397

Open
spring-projects-issues opened this issue Feb 8, 2016 · 3 comments

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Feb 8, 2016

Mark Paluch opened DATASOLR-276 and commented

Current CDI support can fail, because it stores SolrOperations instances in a map with String key representing a set of Qualifiers:

solrOperationsMap.put(bean.getQualifiers().toString(), ((Bean<SolrOperations>) bean));

However, Set doesn't define iteration order (or even String representation for that matter), so with 2+ Qualifiers there's a good chance to get them in the wrong order and fail to find operations.

Related issue: DATACASS-249


Affects: 1.4.2 (Fowler SR2), 1.3.4 (Evans SR4), 1.5.1 (Gosling SR1), 2.0 M1 (Hopper)

Issue Links:

  • DATACASS-249 CDI support can fail due to Set.toString() used as Map key

Referenced from: pull request #72, and commits 128eb8f, b2cd2ee

1 votes, 2 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 21, 2016

Kay Michael Masslow commented

Actually this is just what happened when I was trying it on Wildfly. IMHO this certainly not a minor issue

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 22, 2016

Kay Michael Masslow commented

The recent pull request does not fix issue; I actually tested this on WildFly 10. Hash values in the Set objects are computed by iterating over the objects and summing up their hash values respectively. Still iteration order is not determined. Suggest you introduce a manual ordering

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 22, 2016

Mark Paluch commented

That's a bug in Weld, see https://issues.jboss.org/browse/WELD-2185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants