GEODE-3436: Suggested improvements to touched files.

* this closes #745


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/be8a1356
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/be8a1356
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/be8a1356

Branch: refs/heads/develop
Commit: be8a135681d2fe156559c2dd60a501beb07b1ab8
Parents: 851932e
Author: Patrick Rhomberg <prhomb...@pivotal.io>
Authored: Fri Aug 25 17:18:17 2017 -0700
Committer: Jinmei Liao <jil...@pivotal.io>
Committed: Tue Aug 29 09:29:22 2017 -0700

----------------------------------------------------------------------
 .../org/apache/geode/BundledJarsJUnitTest.java  | 10 +++----
 .../commands/CreateDefinedIndexesCommand.java   |  3 --
 .../cli/commands/CreateIndexCommand.java        |  3 --
 .../cli/commands/CreateRegionCommand.java       |  8 +++---
 .../cli/commands/ExecuteFunctionCommand.java    |  1 -
 .../cli/commands/ExportStackTraceCommand.java   | 25 ----------------
 .../internal/cli/commands/GfshHelpCommand.java  |  6 ++--
 .../cli/commands/ListFunctionCommand.java       |  2 --
 .../cli/commands/ShowMetricsCommand.java        |  7 +++--
 .../internal/cli/commands/ShutdownCommand.java  | 24 +++++++---------
 .../StatusClusterConfigServiceCommand.java      |  2 +-
 .../cli/functions/RegionCreateFunction.java     | 15 ++++------
 .../web/controllers/PdxCommandsController.java  |  7 +++--
 .../controllers/RegionCommandsController.java   |  7 +++--
 .../geode/redis/internal/RegionProvider.java    | 14 ++++-----
 .../commands/AlterRegionCommandDUnitTest.java   |  6 ++--
 ...eateAlterDestroyRegionCommandsDUnitTest.java |  7 ++---
 .../commands/CreateRegionCommandDUnitTest.java  | 30 ++++++--------------
 .../commands/DestroyRegionCommandDUnitTest.java | 10 +++----
 .../commands/DiskStoreCommandsDUnitTest.java    |  4 +--
 .../cli/commands/ListIndexCommandDUnitTest.java |  2 +-
 .../cli/commands/ListIndexCommandJUnitTest.java |  4 +--
 .../cli/commands/ShowDeadlockDUnitTest.java     |  1 -
 .../internal/security/TestCommand.java          |  7 -----
 24 files changed, 70 insertions(+), 135 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-assembly/src/test/java/org/apache/geode/BundledJarsJUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-assembly/src/test/java/org/apache/geode/BundledJarsJUnitTest.java 
b/geode-assembly/src/test/java/org/apache/geode/BundledJarsJUnitTest.java
index 3a5538c..8e99a7a 100644
--- a/geode-assembly/src/test/java/org/apache/geode/BundledJarsJUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/BundledJarsJUnitTest.java
@@ -57,13 +57,13 @@ public class BundledJarsJUnitTest {
     TreeMap<String, String> sortedJars = getBundledJars();
     Stream<String> lines =
         sortedJars.entrySet().stream().map(entry -> 
removeVersion(entry.getKey()));
-    Set<String> bundledJarNames = new 
TreeSet<String>(lines.collect(Collectors.toSet()));
+    Set<String> bundledJarNames = new 
TreeSet<>(lines.collect(Collectors.toSet()));
 
     Files.write(Paths.get("bundled_jars.txt"), bundledJarNames);
 
-    TreeSet<String> newJars = new TreeSet<String>(bundledJarNames);
+    TreeSet<String> newJars = new TreeSet<>(bundledJarNames);
     newJars.removeAll(expectedJars);
-    TreeSet<String> missingJars = new TreeSet<String>(expectedJars);
+    TreeSet<String> missingJars = new TreeSet<>(expectedJars);
     missingJars.removeAll(bundledJarNames);
 
     String message =
@@ -89,11 +89,11 @@ public class BundledJarsJUnitTest {
         geodeHomeDirectory.isDirectory());
 
     Collection<File> jars = FileUtils.listFiles(geodeHomeDirectory, new 
String[] {"jar"}, true);
-    TreeMap<String, String> sortedJars = new TreeMap<String, String>();
+    TreeMap<String, String> sortedJars = new TreeMap<>();
     jars.forEach(jar -> sortedJars.put(jar.getName(), jar.getPath()));
 
     Collection<File> wars = FileUtils.listFiles(geodeHomeDirectory, new 
String[] {"war"}, true);
-    TreeSet<File> sortedWars = new TreeSet<File>(wars);
+    TreeSet<File> sortedWars = new TreeSet<>(wars);
     sortedWars.stream().flatMap(BundledJarsJUnitTest::extractJarNames)
         .forEach(jar -> sortedJars.put(jar.getName(), jar.getPath()));
 

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
index 3487279..0b34a26 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommand.java
@@ -25,7 +25,6 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.springframework.shell.core.annotation.CliCommand;
 import org.springframework.shell.core.annotation.CliOption;
 
-import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.execute.ResultCollector;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.management.cli.CliMetaData;
@@ -77,8 +76,6 @@ public class CreateDefinedIndexesCommand implements 
GfshCommand {
         return 
ResultBuilder.createUserErrorResult(CliStrings.NO_MEMBERS_FOUND_MESSAGE);
       }
 
-      // TODO PSR: is this safe to remove?
-      CacheFactory.getAnyInstance();
       final ResultCollector<?, ?> rc = 
CliUtil.executeFunction(createDefinedIndexesFunction,
           IndexDefinition.indexDefinitions, targetMembers);
 

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommand.java
index 5bae92d..6f379d7 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateIndexCommand.java
@@ -25,7 +25,6 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.springframework.shell.core.annotation.CliCommand;
 import org.springframework.shell.core.annotation.CliOption;
 
-import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.execute.ResultCollector;
 import org.apache.geode.distributed.DistributedMember;
@@ -79,8 +78,6 @@ public class CreateIndexCommand implements GfshCommand {
     AtomicReference<XmlEntity> xmlEntity = new AtomicReference<>();
 
     try {
-      // TODO PSR: Is this safe to remove?
-      CacheFactory.getAnyInstance();
       int idxType;
 
       // Index type check

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
index 294e4f3..88c032a 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommand.java
@@ -204,7 +204,7 @@ public class CreateRegionCommand implements GfshCommand {
         if (!regionExists(cache, useAttributesFrom)) {
           throw new IllegalArgumentException(CliStrings.format(
               
CliStrings.CREATE_REGION__MSG__SPECIFY_VALID_REGION_PATH_FOR_0_REGIONPATH_1_NOT_FOUND,
-              new Object[] {CliStrings.CREATE_REGION__USEATTRIBUTESFROM, 
useAttributesFrom}));
+              CliStrings.CREATE_REGION__USEATTRIBUTESFROM, useAttributesFrom));
         }
 
         
FetchRegionAttributesFunction.FetchRegionAttributesFunctionResult<Object, 
Object> regionAttributesResult =
@@ -349,7 +349,7 @@ public class CreateRegionCommand implements GfshCommand {
       if (!regionExists(cache, useAttributesFrom)) { // check already done in 
createRegion !!!
         throw new IllegalArgumentException(CliStrings.format(
             
CliStrings.CREATE_REGION__MSG__SPECIFY_VALID_REGION_PATH_FOR_0_REGIONPATH_1_NOT_FOUND,
-            new Object[] {CliStrings.CREATE_REGION__USEATTRIBUTESFROM, 
useAttributesFrom}));
+            CliStrings.CREATE_REGION__USEATTRIBUTESFROM, useAttributesFrom));
       }
       if (!regionFunctionArgs.isSetUseAttributesFrom()
           || regionFunctionArgs.getRegionAttributes() == null) {
@@ -374,7 +374,7 @@ public class CreateRegionCommand implements GfshCommand {
         if (foundRegionPath == null) {
           throw new IllegalArgumentException(CliStrings.format(
               
CliStrings.CREATE_REGION__MSG__SPECIFY_VALID_REGION_PATH_FOR_0_REGIONPATH_1_NOT_FOUND,
-              new Object[] {CliStrings.CREATE_REGION__COLOCATEDWITH, 
colocatedWith}));
+              CliStrings.CREATE_REGION__COLOCATEDWITH, colocatedWith));
         }
         ManagementService mgmtService = 
ManagementService.getExistingManagementService(cache);
         DistributedRegionMXBean distributedRegionMXBean =
@@ -606,7 +606,7 @@ public class CreateRegionCommand implements GfshCommand {
               LogWrapper.getInstance().info(CliUtil.stackTraceAsString((th)));
               throw new IllegalArgumentException(CliStrings.format(
                   
CliStrings.CREATE_REGION__MSG__COULD_NOT_RETRIEVE_REGION_ATTRS_FOR_PATH_0_REASON_1,
-                  new Object[] {regionPath, th.getMessage()}));
+                  regionPath, th.getMessage()));
             } else { // has to be RegionAttributes
               @SuppressWarnings("unchecked") // to avoid warning :(
               
FetchRegionAttributesFunction.FetchRegionAttributesFunctionResult<K, V> regAttr 
=

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExecuteFunctionCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExecuteFunctionCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExecuteFunctionCommand.java
index a016ccf..46ad6e5 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExecuteFunctionCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExecuteFunctionCommand.java
@@ -132,7 +132,6 @@ public class ExecuteFunctionCommand implements GfshCommand {
         // if user wish to execute on locator then he can choose --member or 
--group option
         Set<DistributedMember> dsMembers = CliUtil.getAllNormalMembers(cache);
         if (dsMembers.size() > 0) {
-          new UserFunctionExecution();
           LogWrapper.getInstance().info(CliStrings
               
.format(CliStrings.EXECUTE_FUNCTION__MSG__EXECUTING_0_ON_ENTIRE_DS, 
functionId));
           for (DistributedMember member : dsMembers) {

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportStackTraceCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportStackTraceCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportStackTraceCommand.java
index a5749ca..4f8693d 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportStackTraceCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ExportStackTraceCommand.java
@@ -38,9 +38,7 @@ import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.management.cli.CliMetaData;
 import org.apache.geode.management.cli.ConverterHint;
 import org.apache.geode.management.cli.Result;
-import org.apache.geode.management.internal.cli.AbstractCliAroundInterceptor;
 import org.apache.geode.management.internal.cli.CliUtil;
-import org.apache.geode.management.internal.cli.GfshParseResult;
 import org.apache.geode.management.internal.cli.domain.StackTracesPerMember;
 import 
org.apache.geode.management.internal.cli.functions.GetStackTracesFunction;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
@@ -121,29 +119,6 @@ public class ExportStackTraceCommand implements 
GfshCommand {
     return result;
   }
 
-  // TODO PSR: ExportStackTrace Interceptor appeared to exist, but was not 
hooked to command and has
-  // a clearly incorrect javadoc.
-  // TODO PSR: It appears it was introduced in 2016-11-26: 
903135115a0466d86fa663e965ace3ff47eba6b4,
-  // but never correctly linked to the command.
-  public static class ExportStackTraceInterceptor extends 
AbstractCliAroundInterceptor {
-    @Override
-    public Result preExecution(GfshParseResult parseResult) {
-
-      Map<String, String> paramValueMap = parseResult.getParamValueStrings();
-      String fileName = paramValueMap.get(CliStrings.EXPORT_STACKTRACE__FILE);
-
-      Response response = readYesNo(
-          CliStrings.format(CliStrings.EXPORT_STACKTRACE_WARN_USER, fileName), 
Response.YES);
-      if (response == Response.NO) {
-        return ResultBuilder
-            
.createShellClientAbortOperationResult(CliStrings.EXPORT_STACKTRACE_MSG_ABORTING);
-      } else {
-        // we don't to show any info result
-        return ResultBuilder.createInfoResult("");
-      }
-    }
-  }
-
   /***
    * Writes the Stack traces member-wise to a text file
    *

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/GfshHelpCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/GfshHelpCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/GfshHelpCommand.java
index 1161f65..5b39647 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/GfshHelpCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/GfshHelpCommand.java
@@ -15,6 +15,9 @@
 
 package org.apache.geode.management.internal.cli.commands;
 
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+
 import org.apache.geode.management.cli.CliMetaData;
 import org.apache.geode.management.cli.ConverterHint;
 import org.apache.geode.management.cli.Result;
@@ -22,9 +25,6 @@ import 
org.apache.geode.management.internal.cli.CommandManager;
 import org.apache.geode.management.internal.cli.CommandManagerAware;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.management.internal.cli.result.ResultBuilder;
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
 
 public class GfshHelpCommand implements GfshCommand, CommandManagerAware {
   private CommandManager commandManager = null;

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListFunctionCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListFunctionCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListFunctionCommand.java
index c7fe51b..86b8985 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListFunctionCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ListFunctionCommand.java
@@ -56,8 +56,6 @@ public class ListFunctionCommand implements GfshCommand {
     TabularResultData tabularData = ResultBuilder.createTabularResultData();
     boolean accumulatedData = false;
 
-    getCache(); // TODO PSR: Can this safely be removed?
-
     Set<DistributedMember> targetMembers = CliUtil.findMembers(groups, 
members);
 
     if (targetMembers.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java
index 7555a62..6236b38 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShowMetricsCommand.java
@@ -23,6 +23,7 @@ import java.util.Set;
 
 import javax.management.ObjectName;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.logging.log4j.Logger;
 import org.springframework.shell.core.annotation.CliCommand;
 import org.springframework.shell.core.annotation.CliOption;
@@ -54,7 +55,7 @@ import 
org.apache.geode.management.internal.security.ResourceOperation;
 import org.apache.geode.security.ResourcePermission;
 
 public class ShowMetricsCommand implements GfshCommand {
-  private final static Logger logger = LogService.getLogger();
+  private static final Logger logger = LogService.getLogger();
 
   @CliCommand(value = CliStrings.SHOW_METRICS, help = 
CliStrings.SHOW_METRICS__HELP)
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_STATISTICS})
@@ -83,7 +84,7 @@ public class ShowMetricsCommand implements GfshCommand {
       }
       if (regionName != null && !regionName.isEmpty()) {
 
-        if 
(!org.apache.geode.internal.lang.StringUtils.isBlank(cacheServerPortString)) {
+        if (StringUtils.isNotBlank(cacheServerPortString)) {
           return ResultBuilder
               
.createUserErrorResult(CliStrings.SHOW_METRICS__CANNOT__USE__CACHESERVERPORT);
         }
@@ -130,7 +131,7 @@ public class ShowMetricsCommand implements GfshCommand {
           result = ResultBuilder.buildResult(erd);
         }
       } else {
-        if 
(!org.apache.geode.internal.lang.StringUtils.isBlank(cacheServerPortString)) {
+        if (StringUtils.isNotBlank(cacheServerPortString)) {
           return ResultBuilder
               
.createUserErrorResult(CliStrings.SHOW_METRICS__CANNOT__USE__CACHESERVERPORT);
         }

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
index fcee9d8..c89331a 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/ShutdownCommand.java
@@ -48,8 +48,8 @@ import 
org.apache.geode.management.internal.security.ResourceOperation;
 import org.apache.geode.security.ResourcePermission;
 
 public class ShutdownCommand implements GfshCommand {
-  private final static String DEFAULT_TIME_OUT = "10";
-  private final static Logger logger = LogService.getLogger();
+  private static final String DEFAULT_TIME_OUT = "10";
+  private static final Logger logger = LogService.getLogger();
 
   @CliCommand(value = CliStrings.SHUTDOWN, help = CliStrings.SHUTDOWN__HELP)
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_LIFECYCLE},
@@ -158,19 +158,15 @@ public class ShutdownCommand implements GfshCommand {
     try {
       final Function shutDownFunction = new ShutDownFunction();
       logger.info("Gfsh executing shutdown on members " + includeMembers);
-      Callable<String> shutdownNodes = new Callable<String>() {
-
-        @Override
-        public String call() {
-          try {
-            Execution execution = FunctionService.onMembers(includeMembers);
-            execution.execute(shutDownFunction);
-          } catch (FunctionException functionEx) {
-            // Expected Exception as the function is shutting down the target 
members and the result
-            // collector will get member departed exception
-          }
-          return "SUCCESS";
+      Callable<String> shutdownNodes = () -> {
+        try {
+          Execution execution = FunctionService.onMembers(includeMembers);
+          execution.execute(shutDownFunction);
+        } catch (FunctionException functionEx) {
+          // Expected Exception as the function is shutting down the target 
members and the result
+          // collector will get member departed exception
         }
+        return "SUCCESS";
       };
       Future<String> result = exec.submit(shutdownNodes);
       result.get(timeout, TimeUnit.MILLISECONDS);

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StatusClusterConfigServiceCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StatusClusterConfigServiceCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StatusClusterConfigServiceCommand.java
index 6a0fc1e..fd4eee0 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StatusClusterConfigServiceCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StatusClusterConfigServiceCommand.java
@@ -48,7 +48,7 @@ public class StatusClusterConfigServiceCommand implements 
GfshCommand {
   @ResourceOperation(resource = Resource.CLUSTER, operation = Operation.READ)
   public Result statusSharedConfiguration() {
     final InternalCache cache = GemFireCacheImpl.getInstance();
-    final Set<DistributedMember> locators = new HashSet<DistributedMember>(
+    final Set<DistributedMember> locators = new HashSet<>(
         
cache.getDistributionManager().getAllHostedLocatorsWithSharedConfiguration().keySet());
     if (locators.isEmpty()) {
       return 
ResultBuilder.createInfoResult(CliStrings.NO_LOCATORS_WITH_SHARED_CONFIG);

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/RegionCreateFunction.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/RegionCreateFunction.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/RegionCreateFunction.java
index 45cb104..4b205ce 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/RegionCreateFunction.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/RegionCreateFunction.java
@@ -94,7 +94,7 @@ public class RegionCreateFunction extends FunctionAdapter 
implements InternalEnt
       XmlEntity xmlEntity = new XmlEntity(CacheXml.REGION, "name", 
createdRegion.getName());
       resultSender.lastResult(new CliFunctionResult(memberNameOrId, xmlEntity,
           
CliStrings.format(CliStrings.CREATE_REGION__MSG__REGION_0_CREATED_ON_1,
-              new Object[] {createdRegion.getFullPath(), memberNameOrId})));
+              createdRegion.getFullPath(), memberNameOrId)));
     } catch (IllegalStateException e) {
       String exceptionMsg = e.getMessage();
       String localizedString =
@@ -105,15 +105,13 @@ public class RegionCreateFunction extends FunctionAdapter 
implements InternalEnt
                 new Object[] 
{String.valueOf(RegionCommandsUtils.PERSISTENT_OVERFLOW_SHORTCUTS)});
       }
       resultSender.lastResult(handleException(memberNameOrId, exceptionMsg, 
null/* do not log */));
-    } catch (IllegalArgumentException e) {
+    } catch (IllegalArgumentException | CreateSubregionException e) {
       resultSender.lastResult(handleException(memberNameOrId, e.getMessage(), 
e));
     } catch (RegionExistsException e) {
       String exceptionMsg =
           
CliStrings.format(CliStrings.CREATE_REGION__MSG__REGION_PATH_0_ALREADY_EXISTS_ON_1,
               regionCreateArgs.getRegionPath(), memberNameOrId);
       resultSender.lastResult(handleException(memberNameOrId, exceptionMsg, 
e));
-    } catch (CreateSubregionException e) {
-      resultSender.lastResult(handleException(memberNameOrId, e.getMessage(), 
e));
     } catch (Exception e) {
       String exceptionMsg = e.getMessage();
       if (exceptionMsg == null) {
@@ -370,9 +368,9 @@ public class RegionCreateFunction extends FunctionAdapter 
implements InternalEnt
 
     PartitionAttributes<K, V> partitionAttributes = 
regionAttributes.getPartitionAttributes();
     if (partitionAttributes != null) {
-      prAttrFactory = new PartitionAttributesFactory<K, 
V>(partitionAttributes);
+      prAttrFactory = new PartitionAttributesFactory<>(partitionAttributes);
     } else {
-      prAttrFactory = new PartitionAttributesFactory<K, V>();
+      prAttrFactory = new PartitionAttributesFactory<>();
     }
 
     String colocatedWith = partitionArgs.getPrColocatedWith();
@@ -421,9 +419,8 @@ public class RegionCreateFunction extends FunctionAdapter 
implements InternalEnt
 
   private static Class<PartitionResolver> forName(String className, String 
neededFor) {
     if (StringUtils.isBlank(className)) {
-      throw new IllegalArgumentException(
-          
CliStrings.format(CliStrings.CREATE_REGION__MSG__INVALID_PARTITION_RESOLVER,
-              new Object[] {className, neededFor}));
+      throw new IllegalArgumentException(CliStrings
+          .format(CliStrings.CREATE_REGION__MSG__INVALID_PARTITION_RESOLVER, 
className, neededFor));
     }
     try {
       return (Class<PartitionResolver>) 
ClassPathLoader.getLatest().forName(className);

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/PdxCommandsController.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/PdxCommandsController.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/PdxCommandsController.java
index 2722964..dd84444 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/PdxCommandsController.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/PdxCommandsController.java
@@ -14,15 +14,16 @@
  */
 package org.apache.geode.management.internal.web.controllers;
 
-import org.apache.geode.internal.lang.StringUtils;
-import org.apache.geode.management.internal.cli.i18n.CliStrings;
-import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import org.apache.geode.internal.lang.StringUtils;
+import org.apache.geode.management.internal.cli.i18n.CliStrings;
+import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
+
 /**
  * The PdxCommandsController class implements GemFire Management REST API web 
service endpoints for
  * Gfsh PDX Commands.

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
index 6d30d74..815bc47 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/web/controllers/RegionCommandsController.java
@@ -14,9 +14,6 @@
  */
 package org.apache.geode.management.internal.web.controllers;
 
-import org.apache.geode.internal.lang.StringUtils;
-import org.apache.geode.management.internal.cli.i18n.CliStrings;
-import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -25,6 +22,10 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.context.request.WebRequest;
 
+import org.apache.geode.internal.lang.StringUtils;
+import org.apache.geode.management.internal.cli.i18n.CliStrings;
+import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
+
 /**
  * The ListRegionCommand and DescribeRegionCommand classes implement GemFire 
Management REST API web
  * service endpoints for the Gfsh Region Commands.

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/main/java/org/apache/geode/redis/internal/RegionProvider.java 
b/geode-core/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
index a626c62..86478a3 100644
--- 
a/geode-core/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
+++ 
b/geode-core/src/main/java/org/apache/geode/redis/internal/RegionProvider.java
@@ -81,7 +81,7 @@ public class RegionProvider implements Closeable {
   private final Cache cache;
   private final QueryService queryService;
   private final ConcurrentMap<ByteArrayWrapper, Map<Enum<?>, Query>> 
preparedQueries =
-      new ConcurrentHashMap<ByteArrayWrapper, Map<Enum<?>, Query>>();
+      new ConcurrentHashMap<>();
   private final ConcurrentMap<ByteArrayWrapper, ScheduledFuture<?>> 
expirationsMap;
   private final ScheduledExecutorService expirationExecutor;
   private final RegionShortcut defaultRegionType;
@@ -95,7 +95,7 @@ public class RegionProvider implements Closeable {
       ScheduledExecutorService expirationExecutor, RegionShortcut 
defaultShortcut) {
     if (stringsRegion == null || hLLRegion == null || redisMetaRegion == null)
       throw new NullPointerException();
-    this.regions = new ConcurrentHashMap<ByteArrayWrapper, Region<?, ?>>();
+    this.regions = new ConcurrentHashMap<>();
     this.stringsRegion = stringsRegion;
     this.hLLRegion = hLLRegion;
     this.redisMetaRegion = redisMetaRegion;
@@ -104,7 +104,7 @@ public class RegionProvider implements Closeable {
     this.expirationsMap = expirationsMap;
     this.expirationExecutor = expirationExecutor;
     this.defaultRegionType = defaultShortcut;
-    this.locks = new ConcurrentHashMap<String, Lock>();
+    this.locks = new ConcurrentHashMap<>();
   }
 
   public boolean existsKey(ByteArrayWrapper key) {
@@ -364,7 +364,7 @@ public class RegionProvider implements Closeable {
     } catch (IndexNameConflictException | IndexExistsException | 
UnsupportedOperationException e) {
       // ignore, these indexes already exist or unsupported but make sure 
prepared queries are made
     }
-    HashMap<Enum<?>, Query> queryList = new HashMap<Enum<?>, Query>();
+    HashMap<Enum<?>, Query> queryList = new HashMap<>();
     for (SortedSetQuery lq : SortedSetQuery.values()) {
       String queryString = lq.getQueryString(fullpath);
       Query query = this.queryService.newQuery(queryString);
@@ -374,10 +374,10 @@ public class RegionProvider implements Closeable {
   }
 
   private void doInitializeList(ByteArrayWrapper key, Region r) {
-    r.put("head", Integer.valueOf(0));
-    r.put("tail", Integer.valueOf(0));
+    r.put("head", 0);
+    r.put("tail", 0);
     String fullpath = r.getFullPath();
-    HashMap<Enum<?>, Query> queryList = new HashMap<Enum<?>, Query>();
+    HashMap<Enum<?>, Query> queryList = new HashMap<>();
     for (ListQuery lq : ListQuery.values()) {
       String queryString = lq.getQueryString(fullpath);
       Query query = this.queryService.newQuery(queryString);

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
index 30e8728..fa368ab 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/AlterRegionCommandDUnitTest.java
@@ -64,7 +64,7 @@ public class AlterRegionCommandDUnitTest extends 
CliCommandTestBase {
   private VM alterVm2;
   private String alterVm2Name;
 
-  private final List<String> filesToBeDeleted = new 
CopyOnWriteArrayList<String>();
+  private final List<String> filesToBeDeleted = new CopyOnWriteArrayList<>();
 
   @Ignore("bug51924")
   @Test
@@ -135,9 +135,7 @@ public class AlterRegionCommandDUnitTest extends 
CliCommandTestBase {
     regionAlterSetDefaultsTest();
     regionAlterManipulatePlugInsTest();
 
-    this.alterVm1.invoke(() -> {
-      getCache().getRegion(alterRegionName).destroyRegion();
-    });
+    this.alterVm1.invoke(() -> 
getCache().getRegion(alterRegionName).destroyRegion());
   }
 
   @Category(FlakyTest.class) // GEODE-3018

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index a1b9ade..f8644cb 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -76,12 +76,11 @@ import org.apache.geode.test.junit.categories.FlakyTest;
 @Category(DistributedTest.class)
 public class CreateAlterDestroyRegionCommandsDUnitTest extends 
CliCommandTestBase {
   private static final long serialVersionUID = 1L;
-  private final List<String> filesToBeDeleted = new 
CopyOnWriteArrayList<String>();
+  private final List<String> filesToBeDeleted = new CopyOnWriteArrayList<>();
 
   private void waitForRegionMBeanCreation(final String regionPath) {
-    Host.getHost(0).getVM(0).invoke(() -> {
-      waitAtMost(5, 
TimeUnit.SECONDS).until(newRegionMBeanIsCreated(regionPath));
-    });
+    Host.getHost(0).getVM(0)
+        .invoke(() -> waitAtMost(5, 
TimeUnit.SECONDS).until(newRegionMBeanIsCreated(regionPath)));
   }
 
   private Callable<Boolean> newRegionMBeanIsCreated(final String regionPath) {

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
index 04168d5..4c0d2c2 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateRegionCommandDUnitTest.java
@@ -49,7 +49,7 @@ import org.apache.geode.test.junit.categories.FlakyTest;
 
 @Category(DistributedTest.class)
 public class CreateRegionCommandDUnitTest extends CliCommandTestBase {
-  private final List<String> filesToBeDeleted = new 
CopyOnWriteArrayList<String>();
+  private final List<String> filesToBeDeleted = new CopyOnWriteArrayList<>();
 
   /**
    * Asserts that the "compressor" option for the "create region" command 
succeeds for a recognized
@@ -61,9 +61,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
     VM vm = Host.getHost(0).getVM(1);
 
     // Create a cache in vm 1
-    vm.invoke(() -> {
-      assertNotNull(getCache());
-    });
+    vm.invoke(() -> assertNotNull(getCache()));
 
     // Run create region command with compression
     CommandStringBuilder commandStringBuilder = new 
CommandStringBuilder(CliStrings.CREATE_REGION);
@@ -100,9 +98,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
     VM vm = Host.getHost(0).getVM(1);
 
     // Create a cache in vm 1
-    vm.invoke(() -> {
-      assertNotNull(getCache());
-    });
+    vm.invoke(() -> assertNotNull(getCache()));
 
     // Create a region with an unrecognized compressor
     CommandStringBuilder commandStringBuilder = new 
CommandStringBuilder(CliStrings.CREATE_REGION);
@@ -130,9 +126,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
     VM vm = Host.getHost(0).getVM(1);
 
     // Create a cache in vm 1
-    vm.invoke(() -> {
-      assertNotNull(getCache());
-    });
+    vm.invoke(() -> assertNotNull(getCache()));
 
     // Create a region with no compression
     CommandStringBuilder commandStringBuilder = new 
CommandStringBuilder(CliStrings.CREATE_REGION);
@@ -204,9 +198,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
     setUpJmxManagerOnVm0ThenConnect(null);
     VM vm = Host.getHost(0).getVM(1);
     // Create a cache in vm 1
-    vm.invoke(() -> {
-      assertNotNull(getCache());
-    });
+    vm.invoke(() -> assertNotNull(getCache()));
 
     ClassBuilder classBuilder = new ClassBuilder();
     // classBuilder.addToClassPath(".");
@@ -249,9 +241,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
       assertEquals("TestPartitionResolver", partitionResolver.getName());
     });
 
-    vm.invoke(() -> {
-      getCache().getRegion("regionWithPartitionResolver").destroyRegion();
-    });
+    vm.invoke(() -> 
getCache().getRegion("regionWithPartitionResolver").destroyRegion());
   }
 
   @Test
@@ -259,9 +249,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
     setUpJmxManagerOnVm0ThenConnect(null);
     VM vm = Host.getHost(0).getVM(1);
     // Create a cache in vm 1
-    vm.invoke(() -> {
-      assertNotNull(getCache());
-    });
+    vm.invoke(() -> assertNotNull(getCache()));
 
     // Create a region with an unrecognized compressor
     CommandStringBuilder commandStringBuilder = new 
CommandStringBuilder(CliStrings.CREATE_REGION);
@@ -288,9 +276,7 @@ public class CreateRegionCommandDUnitTest extends 
CliCommandTestBase {
     setUpJmxManagerOnVm0ThenConnect(null);
     VM vm = Host.getHost(0).getVM(1);
     // Create a cache in vm 1
-    vm.invoke(() -> {
-      assertNotNull(getCache());
-    });
+    vm.invoke(() -> assertNotNull(getCache()));
 
     // Create a region with an unrecognized compressor
     CommandStringBuilder commandStringBuilder = new 
CommandStringBuilder(CliStrings.CREATE_REGION);

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
index e178d8c..a3afe33 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DestroyRegionCommandDUnitTest.java
@@ -166,9 +166,8 @@ public class DestroyRegionCommandDUnitTest extends 
CliCommandTestBase {
 
     for (int i = 1; i <= 3; i++) {
       final int x = i;
-      Host.getHost(0).getVM(i).invoke(() -> {
-        assertNull("Region still exists in VM " + x, 
getCache().getRegion("Customer"));
-      });
+      Host.getHost(0).getVM(i).invoke(
+          () -> assertNull("Region still exists in VM " + x, 
getCache().getRegion("Customer")));
     }
   }
 
@@ -365,9 +364,8 @@ public class DestroyRegionCommandDUnitTest extends 
CliCommandTestBase {
   }
 
   private void waitForRegionMBeanCreation(final String regionPath, final int 
mbeanCount) {
-    Host.getHost(0).getVM(0).invoke(() -> {
-      waitAtMost(5, 
TimeUnit.SECONDS).until(newRegionMBeanIsCreated(regionPath, mbeanCount));
-    });
+    Host.getHost(0).getVM(0).invoke(() -> waitAtMost(5, TimeUnit.SECONDS)
+        .until(newRegionMBeanIsCreated(regionPath, mbeanCount)));
   }
 
   private Callable<Boolean> newRegionMBeanIsCreated(final String regionPath, 
final int mbeanCount) {

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 1002f5d..341216c 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -692,7 +692,7 @@ public class DiskStoreCommandsDUnitTest extends 
CliCommandTestBase {
     final String diskStoreName1 = "DiskStore1";
     final String region1 = "Region1";
     final String region2 = "Region2";
-    final Map<String, String> entries = new HashMap<String, String>();
+    final Map<String, String> entries = new HashMap<>();
     entries.put("key1", "value1");
     entries.put("key2", "value2");
 
@@ -1450,7 +1450,7 @@ public class DiskStoreCommandsDUnitTest extends 
CliCommandTestBase {
     diskStoreFactory.setAutoCompact(false);
     diskStoreFactory.create(diskStoreName);
 
-    /****
+    /*
      * Eviction Attributes
      */
     EvictionAttributes ea =

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index 6dc23ce..7b9afc3 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -563,7 +563,7 @@ public class ListIndexCommandDUnitTest extends 
CliCommandTestBase {
     }
   }
 
-  private static abstract class AbstractBean<T extends Comparable<T>>
+  private abstract static class AbstractBean<T extends Comparable<T>>
       implements MutableIdentifiable<T>, Serializable {
 
     private T id;

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandJUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandJUnitTest.java
index 8deb4ae..82b1ecd 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ListIndexCommandJUnitTest.java
@@ -111,7 +111,7 @@ public class ListIndexCommandJUnitTest {
     final List<IndexDetails> expectedIndexDetails =
         Arrays.asList(indexDetails1, indexDetails2, indexDetails3);
 
-    final List<Set<IndexDetails>> results = new 
ArrayList<Set<IndexDetails>>(2);
+    final List<Set<IndexDetails>> results = new ArrayList<>(2);
 
     results.add(CollectionUtils.asSet(indexDetails2, indexDetails1));
     results.add(CollectionUtils.asSet(indexDetails3));
@@ -169,7 +169,7 @@ public class ListIndexCommandJUnitTest {
 
     final List<IndexDetails> expectedIndexDetails = 
Collections.singletonList(indexDetails);
 
-    final List<Object> results = new ArrayList<Object>(2);
+    final List<Object> results = new ArrayList<>(2);
 
     results.add(CollectionUtils.asSet(indexDetails));
     results.add(new FunctionInvocationTargetException("expected"));

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
index ca2a043..4df0b96 100755
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ShowDeadlockDUnitTest.java
@@ -57,7 +57,6 @@ import org.apache.geode.test.junit.categories.DistributedTest;
 import 
org.apache.geode.test.junit.rules.serializable.SerializableTemporaryFolder;
 
 /**
- * Distributed tests for show deadlock command in {@link 
MiscellaneousCommands}.
  *
  * @see GemFireDeadlockDetectorDUnitTest
  */

http://git-wip-us.apache.org/repos/asf/geode/blob/be8a1356/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
----------------------------------------------------------------------
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
index 5c91ca6..17719be 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
@@ -185,13 +185,6 @@ public class TestCommand {
     createTestCommand("import cluster-configuration 
--zip-file-name=value.zip", clusterManage);
 
     // DestroyFunctionCommand, ExecuteFunctionCommand, ListFunctionCommand
-    // TODO PSR: the `destroy function` command is interactive (in its 
interceptor) when both
-    // onGroup == null && onMember == null.
-    // This causes the function to throw
-    // CODE_SHELLCLIENT_ABORT_OP = 110;
-    // instead of the expected
-    // ERRORCODE_UNAUTHORIZED = 415;
-    // TODO: Should authorization occur before the interceptor resolves?
     // createTestCommand("destroy function --id=InterestCalculations", 
dataManage);
     createTestCommand("execute function --id=InterestCalculations 
--groups=Group1", dataWrite);
     createTestCommand("list functions", clusterRead);

Reply via email to