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 [DATACASS-249] #425

Closed
spring-projects-issues opened this issue Jan 19, 2016 · 0 comments

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jan 19, 2016

Anton Koscejev opened DATACASS-249 and commented

Current CDI support sometimes fails, because it stores CassandraOperation instances in a map with String key representing a set of Qualifiers:

cassandraOperationsMap.put(bean.getQualifiers().toString(), ((Bean<CassandraOperations>) 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:

Bean<CassandraOperations> cassandraOperationsBean = this.cassandraOperationsMap.get(qualifiers.toString());

Example:
\[@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()]
!=
\[@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default()]


Affects: 1.3.2 (Gosling SR2)

Issue Links:

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

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

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

Backported to: 1.4.2 (Hopper SR2), 1.3.5 (Gosling SR5)

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