[
https://issues.apache.org/jira/browse/GEODE-3268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117489#comment-16117489
]
ASF GitHub Bot commented on GEODE-3268:
---------------------------------------
Github user PurelyApplied commented on a diff in the pull request:
https://github.com/apache/geode/pull/693#discussion_r131775864
--- Diff:
geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DescribeRegionCommand.java
---
@@ -333,9 +247,8 @@ private void
writeCommonAttributesToTable(TabularResultData table, String attrib
}
}
- private boolean writeFixedPartitionAttributesToTable(TabularResultData
table,
- String attributeType, List<FixedPartitionAttributesInfo> fpaList,
String member,
- boolean isMemberNameAdded) {
+ private void writeFixedPartitionAttributesToTable(TabularResultData
table,
--- End diff --
In this function, a couple of low-hanging cleanups could be:
(1) Change the big `if` to a guard clause
```
if (fpaList == null) {
return;
}
```
(2) Change the iterated `while` loop to a `for:` loop.
Also, both of these can be cleanly easily handled by your IDE (although you
might need to move the `Iterator<FixedPartitionAttributesInfo> fpaIter =
fpaList.iterator();` next to the `while` first).
> Refactor RegionCommands
> -----------------------
>
> Key: GEODE-3268
> URL: https://issues.apache.org/jira/browse/GEODE-3268
> Project: Geode
> Issue Type: Sub-task
> Components: gfsh
> Reporter: Emily Yeh
> Assignee: Emily Yeh
>
> {{RegionCommands.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)