Why is InternalCardinality a final class?

(Reese Levine) #1

I'm wondering if there's a good reason why the InternalCardinality class in the Elasticsearch java client is final, as it makes it hard to mock it for testing purposes. Especially since many of the other internal aggregations are not final classes (for example, https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/search/aggregations/metrics/valuecount/InternalValueCount.java).


(Simon Willnauer) #2

it is not intended to be subclassed and most of the other Internal* classes might be marked final in the future.

(Reese Levine) #3

Alright, thanks for letting me know!

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.