Github user kirklund commented on a diff in the pull request: https://github.com/apache/incubator-geode/pull/278#discussion_r86033253 --- Diff: geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java --- @@ -907,6 +903,31 @@ private void validateRegionFunctionArgs(Cache cache, RegionFunctionArgs regionFu new Object[] {regionFunctionArgs.getCompressor()})); } } + + if (regionFunctionArgs.hasPartitionAttributes()) { + boolean partitionResolverFailure = false; + if (regionFunctionArgs.isPartitionResolverSet()) { + String partitionResolverClassName = regionFunctionArgs.getPartitionResolver(); + Object partitionResolver = null; + + try { + Class<?> compressorClass = + (Class<?>) ClassPathLoader.getLatest().forName(partitionResolverClassName); + partitionResolver = compressorClass.newInstance(); + } catch (InstantiationException e) { --- End diff -- I'd really like to see us keep the original cause instead of discarding it. That will facilitate debugging. You can also you the multiple-catch syntax here: Exception cause = null; try { ... } catch (InstantiationException| IllegalAccessException| ClassNotFoundException e) { cause = e; }
--- 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. ---