Valentin Kulichenko created IGNITE-5781:
-------------------------------------------
Summary: Visor throws ClassCastException if cache store
implementation is other than CacheJdbcPojoStore
Key: IGNITE-5781
URL: https://issues.apache.org/jira/browse/IGNITE-5781
Project: Ignite
Issue Type: Bug
Components: visor
Affects Versions: 2.0
Reporter: Valentin Kulichenko
Fix For: 2.2
Issue is reported on user list:
http://apache-ignite-users.70518.x6.nabble.com/Problem-with-Visor-and-Cassandra-Cache-Store-td15076.html
There is an obvious bug in the code. {{VisorCacheJdbcType#list}} method checks
the type of store factory like this:
{code}
if (factory != null || factory instanceof CacheJdbcPojoStoreFactory) {
CacheJdbcPojoStoreFactory jdbcFactory = (CacheJdbcPojoStoreFactory) factory;
{code}
It should be {{&&}} instead of {{||}}, because otherwise condition will be
{{true}} for any factory that is not {{null}}. Even better if {{factory !=
null}} is removed completely as {{instanceof}} returns {{false}} for {{null}}
values anyway.
However, it's not clear to me why this scenario is reproduced only in certain
conditions (see mailing list thread for details). It's possible that there is
another hidden bug, this needs to be investigated.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)