Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-249

CDI support can fail due to Set.toString() used as Map key

    XMLWordPrintable

    Details

    • Last commented by a User:
      true

      Description

      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()]

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              koscejev Anton Koscejev
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 21 weeks, 2 days ago