Github user PurelyApplied commented on a diff in the pull request: https://github.com/apache/geode/pull/596#discussion_r123832527 --- Diff: geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/FunctionCommands.java --- @@ -130,31 +125,8 @@ public Result executeFunction( return result; } - if (onRegion != null && onMember != null && onGroups != null) { - ErrorResultData errorResultData = - ResultBuilder.createErrorResultData().setErrorCode(ResultBuilder.ERRORCODE_DEFAULT) - .addLine(CliStrings.EXECUTE_FUNCTION__MSG__OPTIONS); - result = ResultBuilder.buildResult(errorResultData); - return result; - } else if (onRegion != null && onMember != null) { - ErrorResultData errorResultData = - ResultBuilder.createErrorResultData().setErrorCode(ResultBuilder.ERRORCODE_DEFAULT) - .addLine(CliStrings.EXECUTE_FUNCTION__MSG__OPTIONS); - result = ResultBuilder.buildResult(errorResultData); - return result; - } else if (onMember != null && onGroups != null) { - ErrorResultData errorResultData = - ResultBuilder.createErrorResultData().setErrorCode(ResultBuilder.ERRORCODE_DEFAULT) - .addLine(CliStrings.EXECUTE_FUNCTION__MSG__OPTIONS); - result = ResultBuilder.buildResult(errorResultData); - return result; - } else if (onRegion != null && onGroups != null) { - ErrorResultData errorResultData = - ResultBuilder.createErrorResultData().setErrorCode(ResultBuilder.ERRORCODE_DEFAULT) - .addLine(CliStrings.EXECUTE_FUNCTION__MSG__OPTIONS); - result = ResultBuilder.buildResult(errorResultData); - return result; - } else if (onRegion != null && onMember != null && onGroups != null) { + if (isMoreThanOneIsTrue(onRegion != null, onMember != null, onGroups != null)) { --- End diff -- Good call. Added in commit `b4bb08b`.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---