[
https://issues.apache.org/jira/browse/IGNITE-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157081#comment-16157081
]
Nikolay Izhikov commented on IGNITE-6301:
-----------------------------------------
[~vozerov]
Thank you for your answer.
As far as I can see:
# There is {{CacheConfiguration#setIndexedTypes(Class<?>... indexedTypes)}} but
implementation of method doesn't write to {{indexedTypes}}
# There is simple getter to return {{indexedTypes}}, but indexedTypes never
initialized(except copy constructor that also write null that variable).
# I propose:
## remove variable indexedTypes from CacheConfiguration.
## keep getIndexedTypes as it removal broke user code, but always return empty
list from it.
Can you tell me what I have missed?
> CacheConfiguration.indexedTypes never initialized and can be removed
> --------------------------------------------------------------------
>
> Key: IGNITE-6301
> URL: https://issues.apache.org/jira/browse/IGNITE-6301
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.1
> Reporter: Nikolay Izhikov
> Priority: Trivial
>
> CacheConfiguration#indexedTypes never initialized and can be removed
> {code:java}
> public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
> //...
> /** */
> private transient Class<?>[] indexedTypes;
> //....
> public CacheConfiguration<K, V> setIndexedTypes(Class<?>... indexedTypes)
> {
> if (F.isEmpty(indexedTypes))
> return this;
> int len = indexedTypes.length;
> if (len == 0)
> return this;
> A.ensure((len & 1) == 0,
> "Number of indexed types is expected to be even. Refer to method
> javadoc for details.");
> if (this.indexedTypes != null)
> throw new CacheException("Indexed types can be set only once.");
> Class<?>[] newIndexedTypes = new Class<?>[len];
> // other method body fill qryEntities list.
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)