IGNITE-472 Fixed check for system cache in case of clear, stop and swap commands.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/22188753 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/22188753 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/22188753 Branch: refs/heads/ignite-1786 Commit: 22188753fa2050f7548927d414776a4cf7a0216f Parents: 77225c0 Author: Alexey Kuznetsov <[email protected]> Authored: Mon Apr 11 12:56:45 2016 +0700 Committer: Alexey Kuznetsov <[email protected]> Committed: Mon Apr 11 12:56:45 2016 +0700 ---------------------------------------------------------------------- .../apache/ignite/visor/commands/cache/VisorCacheCommand.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/22188753/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala index 45429c4..b4ed6b8 100755 --- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala +++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala @@ -259,8 +259,7 @@ class VisorCacheCommand { if (hasArgFlagIn("clear", "swap", "scan", "stop")) { if (cacheName.isEmpty) - askForCache("Select cache from:", node, showSystem && !hasArgFlagIn("clear", "swap", "stop"), - aggrData) match { + askForCache("Select cache from:", node, showSystem && !hasArgFlagIn("clear", "swap", "stop"), aggrData) match { case Some(name) => argLst = argLst ++ Seq("c" -> name) @@ -273,7 +272,7 @@ class VisorCacheCommand { if (hasArgFlag("scan", argLst)) VisorCacheScanCommand().scan(argLst, node) else { - if (!aggrData.exists(cache => safeEquals(cache.name(), name) && cache.system())) { + if (aggrData.nonEmpty && !aggrData.exists(cache => safeEquals(cache.name(), name) && cache.system())) { if (hasArgFlag("clear", argLst)) VisorCacheClearCommand().clear(argLst, node) else if (hasArgFlag("swap", argLst))
