[
https://issues.apache.org/jira/browse/GEODE-3255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16111760#comment-16111760
]
ASF GitHub Bot commented on GEODE-3255:
---------------------------------------
Github user YehEmily commented on a diff in the pull request:
https://github.com/apache/geode/pull/671#discussion_r131002611
--- Diff:
geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
---
@@ -1143,4 +721,26 @@ private boolean
isAttributePersistent(RegionAttributes attributes) {
return attributes != null && attributes.getDataPolicy() != null
&& attributes.getDataPolicy().toString().contains("PERSISTENT");
}
+
+ private static boolean regionExists(InternalCache cache, String
regionPath) {
--- End diff --
Fixed! Thanks for your feedback! Do you mean it would be nice to have a
test that would fail if `regionExists` always returns `true`, regardless of
whether the region does or doesn't exist? I wrote a very simple test that does
this and put it in `CreateRegionCommandTest`.
> Refactor CreateAlterDestroyRegionCommands
> -----------------------------------------
>
> Key: GEODE-3255
> URL: https://issues.apache.org/jira/browse/GEODE-3255
> Project: Geode
> Issue Type: Sub-task
> Components: gfsh
> Reporter: Emily Yeh
> Assignee: Emily Yeh
>
> {{CreateAlterDestroyRegionCommands.java}} is a large class that contains
> multiple commands. Each command should be refactored into a separate class,
> and the methods shared by the commands should be refactored into a new and
> appropriately named class of their own.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)