geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [08/14] geode git commit: GEODE-1994: Overhaul of internal.lang.StringUtils to extend and heavily use commons.lang.StringUtils
Date Fri, 19 May 2017 21:34:35 GMT
GEODE-1994: Overhaul of internal.lang.StringUtils to extend and heavily use commons.lang.StringUtils

*   geode.internal.lang.StringUtils has been deprecated.  In the interim, it has been heavily refactored and extends commons.lang.StringUtils.
*
*   Renamed:
*   --  EMPTY_STRING -> EMPTY (inherited)
*   --  toUpperCase  -> upperCase (inherited)
*   --  toLowerCase  -> lowerCase (inherited)
*   --  padEnding    -> rightPad (inherited)
*
*   Removed:
*   --  EMPTY_STRING_ARRAY; usage replaced with commons.lang.ArrayUtils.EMPTY_STRING_ARRAY
*   --  SPACES
*   --  UTF_8; rare usage replaced with raw string
*   --  concat; usage replaced with commons.lang.join, refactoring as necessary.
*   --  getLettersOnly
*   --  getSpaces
*   --  truncate
*   --  valueOf; usage refactored to use defaultString
*
*   Refactored
*   --  defaultIfBlank: previously relied on varargs and could return null.  Usage refactored to allow inheritance from commons.
*   --  defaultString(s, EMPTY) refactored to use standard signature defaultString(s) for consistency throughout codebase.
*   --  isBlank: usage refactored to resolve discrepancies with commons.lang.isBlank, which is now inherited.
*   --  isEmpty: usage refactored to resolve discrepancies with commons.lang.isEmpty, which is now inherited.
*
*   Code Cleanup:
*   --  Many uses of !isBlank -> isNotBlank
*   --  Changes suggested by Inspections on most touched files.
*   --     Explicit <T> -> <> when type is inferable
*   --     while loops operating on iterators converted to for each loops
*   --     for loops operating on array indices converted to for each loops
*   --  Various string typos corrected.
*   --  isEmpty(s.trim()) -> isBlank(s)
*   --  s.trim().isEmpty() -> isEmpty(s)
*   --  Removed some instances of 'dead' code
*   --  Optimized imports in every touched file
*
*   Qualitative Changes:
*   --  The following functions now throw an error when called with a null string input:
*   --  *  LocatorLauncher.Builder.setMemberName
*   --  *  ServerLauncher.Builder.setMemberName
*   --  *  ServerLauncher.Builder.setHostnameForClients
*   --  (Unit tests added to capture these changes)
*
*   Notes:
*   --  StringUtils.wraps may be inherited from Apache Commons when the dependency is updated.
*   --  AbstractLauncher.getMember has the documented behavior of returning null when both MemberName and ID are blank.  Is this the best behavior for this method?

* this closes #521


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

Branch: refs/heads/feature/GEODE-2929-1
Commit: d16d192b22f2932ac95780f18e92f0aece730240
Parents: 9af854a
Author: Patrick Rhomberg <prhomberg@pivotal.io>
Authored: Wed May 17 16:57:07 2017 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Fri May 19 10:29:16 2017 -0700

----------------------------------------------------------------------
 .../LauncherLifecycleCommandsDUnitTest.java     |  77 ++--
 .../commands/LauncherLifecycleCommandsTest.java |  61 +--
 .../web/controllers/RestAPITestBase.java        |  54 +--
 .../internal/locator/LocatorStatusResponse.java |  32 +-
 .../query/internal/AttributeDescriptor.java     |  70 +---
 .../cache/query/internal/NWayMergeResults.java  |  31 +-
 .../geode/distributed/AbstractLauncher.java     |  27 +-
 .../geode/distributed/LocatorLauncher.java      |  58 ++-
 .../geode/distributed/ServerLauncher.java       |  72 ++--
 .../internal/ClusterConfigurationService.java   |  64 ++--
 .../distributed/internal/InternalLocator.java   |  46 +--
 .../membership/gms/membership/GMSJoinLeave.java |  67 ++--
 .../geode/internal/InternalDataSerializer.java  | 134 +++----
 .../admin/remote/RemoteTransportConfig.java     |  25 +-
 .../cache/ClusterConfigurationLoader.java       |  47 ++-
 .../geode/internal/cache/EntryEventImpl.java    |  20 +-
 .../internal/cache/tier/sockets/HandShake.java  |  85 ++---
 .../apache/geode/internal/lang/StringUtils.java | 268 ++-----------
 .../apache/geode/internal/lang/SystemUtils.java |   4 +-
 .../internal/process/FileProcessController.java |  11 +-
 .../geode/internal/process/signal/Signal.java   |   4 +-
 .../security/IntegratedSecurityService.java     |  10 +-
 .../apache/geode/internal/util/ArrayUtils.java  |  11 +-
 .../org/apache/geode/internal/util/IOUtils.java |   6 +-
 .../geode/management/internal/AgentUtil.java    |   8 +-
 .../geode/management/internal/JettyHelper.java  |  27 +-
 .../management/internal/ManagementAgent.java    |  60 ++-
 .../geode/management/internal/RestAgent.java    |  21 +-
 .../geode/management/internal/SSLUtil.java      |   5 +-
 .../internal/beans/DistributedSystemBridge.java | 175 ++++-----
 .../internal/beans/DistributedSystemMBean.java  |  11 +-
 .../internal/beans/ManagementAdapter.java       |  82 ++--
 .../internal/beans/QueryDataFunction.java       |  90 ++---
 .../geode/management/internal/cli/CliUtil.java  |  48 +--
 .../cli/commands/AbstractCommandsSupport.java   |  15 +-
 .../internal/cli/commands/ConfigCommands.java   |  40 +-
 .../CreateAlterDestroyRegionCommands.java       | 187 ++++------
 ...xportImportClusterConfigurationCommands.java |  34 +-
 .../internal/cli/commands/IndexCommands.java    |  25 +-
 .../cli/commands/LauncherLifecycleCommands.java | 372 +++++++------------
 .../internal/cli/commands/ShellCommands.java    |  10 +-
 .../cli/converters/FilePathStringConverter.java |   2 +-
 .../converters/GatewaySenderIdConverter.java    |  15 +-
 .../internal/cli/domain/DiskStoreDetails.java   |  10 +-
 .../internal/cli/domain/IndexDetails.java       |  14 +-
 .../functions/DescribeDiskStoreFunction.java    |  13 +-
 .../FetchSharedConfigurationStatusFunction.java |   2 +-
 .../cli/functions/RegionCreateFunction.java     |  11 +-
 .../management/internal/cli/help/HelpBlock.java |   4 +-
 .../management/internal/cli/help/Helper.java    |   4 +-
 .../internal/cli/result/ResultBuilder.java      |  18 +-
 .../internal/cli/result/TableBuilder.java       |  30 +-
 .../internal/cli/shell/GfshConfig.java          |   6 +-
 .../cli/shell/GfshExecutionStrategy.java        |  16 +-
 .../internal/cli/shell/JmxOperationInvoker.java |   4 +-
 .../internal/cli/util/CommandStringBuilder.java |   4 +-
 .../configuration/domain/XmlEntity.java         |  50 ++-
 .../messages/ConfigurationRequest.java          |  12 +-
 .../messages/ConfigurationResponse.java         |  22 +-
 .../internal/configuration/utils/XmlUtils.java  |  33 +-
 .../controllers/AbstractCommandsController.java |  62 ++--
 .../controllers/ConfigCommandsController.java   |  10 +-
 .../web/controllers/DataCommandsController.java |   4 +-
 .../controllers/DeployCommandsController.java   |  13 +-
 .../DiskStoreCommandsController.java            |  16 +-
 .../DurableClientCommandsController.java        |  14 +-
 .../web/controllers/ExportLogController.java    |   2 +-
 .../controllers/FunctionCommandsController.java |  10 +-
 .../MiscellaneousCommandsController.java        |   4 +-
 .../web/controllers/PdxCommandsController.java  |   9 +-
 .../controllers/QueueCommandsController.java    |   7 +-
 .../controllers/RegionCommandsController.java   |  11 +-
 .../controllers/ShellCommandsController.java    |  34 +-
 .../web/controllers/WanCommandsController.java  |  55 ++-
 .../management/internal/web/domain/Link.java    |  12 +-
 .../internal/web/domain/LinkIndex.java          |   6 +-
 .../internal/web/http/HttpHeader.java           |   4 +-
 .../web/shell/RestHttpOperationInvoker.java     |   4 +-
 .../internal/web/util/ConvertUtils.java         |  11 +-
 .../management/internal/web/util/UriUtils.java  |   4 +-
 .../cache/client/internal/LocatorTestBase.java  |  40 +-
 .../AbstractLauncherIntegrationTestCase.java    |   2 +-
 .../geode/distributed/AbstractLauncherTest.java |  24 +-
 .../LocatorLauncherIntegrationTest.java         |  14 +-
 .../geode/distributed/LocatorLauncherTest.java  |  61 ++-
 .../ServerLauncherIntegrationTest.java          |  14 +-
 .../geode/distributed/ServerLauncherTest.java   |  40 +-
 .../internal/lang/ClassUtilsJUnitTest.java      |  15 +-
 .../internal/lang/StringUtilsJUnitTest.java     | 244 +-----------
 .../internal/util/CollectionUtilsJUnitTest.java |  96 ++---
 .../AbstractCommandsSupportJUnitTest.java       |  40 +-
 .../cli/commands/ListIndexCommandDUnitTest.java |  45 ++-
 .../internal/configuration/ClusterConfig.java   |  14 +-
 .../dunit/rules/GfshShellConnectionRule.java    |   2 +-
 .../internal/cli/LuceneIndexCommands.java       |  45 +--
 .../functions/LuceneCreateIndexFunction.java    |   3 +-
 .../cli/LuceneIndexCommandsJUnitTest.java       |  61 +--
 .../pulse/testbed/PropMockDataUpdater.java      |  17 +-
 .../geodefunctions/RetrieveRegionFunction.java  |  20 +-
 .../internal/web/AbstractWebTestCase.java       |  14 +-
 .../ShellCommandsControllerJUnitTest.java       |  38 +-
 .../RestHttpOperationInvokerJUnitTest.java      |  40 +-
 102 files changed, 1648 insertions(+), 2297 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index 5277e57..27bc098 100644
--- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -14,41 +14,13 @@
  */
 package org.apache.geode.management.internal.cli.commands;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.apache.geode.test.dunit.Assert.*;
-import static org.apache.geode.test.dunit.Wait.*;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.nio.charset.Charset;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedDeque;
-import java.util.concurrent.TimeUnit;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.junit.FixMethodOrder;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runners.MethodSorters;
+import static org.apache.geode.distributed.ConfigurationProperties.DURABLE_CLIENT_ID;
+import static org.apache.geode.distributed.ConfigurationProperties.START_LOCATOR;
+import static org.apache.geode.test.dunit.Assert.assertEquals;
+import static org.apache.geode.test.dunit.Assert.assertFalse;
+import static org.apache.geode.test.dunit.Assert.assertNotNull;
+import static org.apache.geode.test.dunit.Assert.assertTrue;
+import static org.apache.geode.test.dunit.Wait.waitForCriterion;
 
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.client.ClientCache;
@@ -79,6 +51,37 @@ import org.apache.geode.management.internal.cli.result.CommandResult;
 import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
 import org.apache.geode.test.dunit.WaitCriterion;
 import org.apache.geode.test.junit.categories.DistributedTest;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.nio.charset.Charset;
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.TimeUnit;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryExp;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
 
 /**
  * The LauncherLifecycleCommandsDUnitTest class is a test suite of integration tests testing the
@@ -389,7 +392,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     assertTrue(resultString,
         resultString
             .contains(MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE,
-                StringUtils.EMPTY_STRING, gemfirePropertiesPathname)));
+                StringUtils.EMPTY, gemfirePropertiesPathname)));
   }
 
   /**
@@ -525,7 +528,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
     assertTrue(resultString,
         resultString
             .contains(MessageFormat.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE,
-                StringUtils.EMPTY_STRING, gemfirePropertiesFile)));
+                StringUtils.EMPTY, gemfirePropertiesFile)));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsTest.java
index 0554f69..2a1662e 100755
--- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/LauncherLifecycleCommandsTest.java
@@ -14,33 +14,42 @@
  */
 package org.apache.geode.management.internal.cli.commands;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-
-import org.apache.geode.distributed.LocatorLauncher;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_BIND_ADDRESS;
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_FILE;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_LEVEL;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.NAME;
+import static org.apache.geode.distributed.ConfigurationProperties.START_DEV_REST_API;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.GemFireException;
 import org.apache.geode.cache.server.CacheServer;
+import org.apache.geode.distributed.LocatorLauncher;
 import org.apache.geode.distributed.ServerLauncher;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.internal.DistributionLocator;
-import org.apache.geode.internal.lang.StringUtils;
 import org.apache.geode.internal.lang.SystemUtils;
 import org.apache.geode.internal.util.IOUtils;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
 
 /**
  * The LauncherLifecycleCommandsTest class is a test suite of test cases testing the contract and
@@ -77,7 +86,7 @@ public class LauncherLifecycleCommandsTest {
 
     assertTrue(commandLine.isEmpty());
 
-    getLauncherLifecycleCommands().addGemFirePropertyFile(commandLine, StringUtils.EMPTY_STRING);
+    getLauncherLifecycleCommands().addGemFirePropertyFile(commandLine, StringUtils.EMPTY);
 
     assertTrue(commandLine.isEmpty());
 
@@ -106,7 +115,7 @@ public class LauncherLifecycleCommandsTest {
 
     gemfireProperties.setProperty(LOCATORS, "localhost[11235]");
     gemfireProperties.setProperty(LOG_LEVEL, "config");
-    gemfireProperties.setProperty(LOG_FILE, StringUtils.EMPTY_STRING);
+    gemfireProperties.setProperty(LOG_FILE, StringUtils.EMPTY);
     gemfireProperties.setProperty(MCAST_PORT, "0");
     gemfireProperties.setProperty(NAME, "machine");
 
@@ -144,7 +153,7 @@ public class LauncherLifecycleCommandsTest {
 
     gemfireProperties.setProperty(LOCATORS, "localhost[11235]");
     gemfireProperties.setProperty(LOG_LEVEL, "config");
-    gemfireProperties.setProperty(LOG_FILE, StringUtils.EMPTY_STRING);
+    gemfireProperties.setProperty(LOG_FILE, StringUtils.EMPTY);
     gemfireProperties.setProperty(MCAST_PORT, "0");
     gemfireProperties.setProperty(NAME, "machine");
 
@@ -182,7 +191,7 @@ public class LauncherLifecycleCommandsTest {
 
     assertTrue(commandLine.isEmpty());
 
-    getLauncherLifecycleCommands().addInitialHeap(commandLine, StringUtils.EMPTY_STRING);
+    getLauncherLifecycleCommands().addInitialHeap(commandLine, StringUtils.EMPTY);
 
     assertTrue(commandLine.isEmpty());
 
@@ -255,7 +264,7 @@ public class LauncherLifecycleCommandsTest {
 
     assertTrue(commandLine.isEmpty());
 
-    getLauncherLifecycleCommands().addMaxHeap(commandLine, StringUtils.EMPTY_STRING);
+    getLauncherLifecycleCommands().addMaxHeap(commandLine, StringUtils.EMPTY);
 
     assertTrue(commandLine.isEmpty());
 
@@ -621,11 +630,11 @@ public class LauncherLifecycleCommandsTest {
   }
 
   private String toClasspath(final String... jarFilePathnames) {
-    String classpath = StringUtils.EMPTY_STRING;
+    String classpath = StringUtils.EMPTY;
 
     if (jarFilePathnames != null) {
       for (final String jarFilePathname : jarFilePathnames) {
-        classpath += (classpath.isEmpty() ? StringUtils.EMPTY_STRING : File.pathSeparator);
+        classpath += (classpath.isEmpty() ? StringUtils.EMPTY : File.pathSeparator);
         classpath += jarFilePathname;
       }
     }
@@ -637,7 +646,7 @@ public class LauncherLifecycleCommandsTest {
     String path = "";
 
     for (Object pathElement : pathElements) {
-      path += (path.isEmpty() ? StringUtils.EMPTY_STRING : File.pathSeparator);
+      path += (path.isEmpty() ? StringUtils.EMPTY : File.pathSeparator);
       path += pathElement;
     }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPITestBase.java b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPITestBase.java
index f2e90a4..4529f2c 100644
--- a/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/org/apache/geode/rest/internal/web/controllers/RestAPITestBase.java
@@ -14,36 +14,21 @@
  */
 package org.apache.geode.rest.internal.web.controllers;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.apache.geode.test.dunit.Assert.*;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.json.JSONArray;
-import org.junit.experimental.categories.Category;
-
+import static org.apache.geode.distributed.ConfigurationProperties.GROUPS;
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_BIND_ADDRESS;
+import static org.apache.geode.distributed.ConfigurationProperties.HTTP_SERVICE_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.START_DEV_REST_API;
+import static org.apache.geode.test.dunit.Assert.assertEquals;
+import static org.apache.geode.test.dunit.Assert.assertNotNull;
+import static org.apache.geode.test.dunit.Assert.fail;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.execute.FunctionService;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.AvailablePortHelper;
 import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.lang.StringUtils;
 import org.apache.geode.management.internal.AgentUtil;
 import org.apache.geode.rest.internal.web.RestFunctionTemplate;
 import org.apache.geode.test.dunit.Host;
@@ -51,6 +36,25 @@ import org.apache.geode.test.dunit.Invoke;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
 import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.json.JSONArray;
+import org.junit.experimental.categories.Category;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Random;
 
 @Category(DistributedTest.class)
 class RestAPITestBase extends JUnit4DistributedTestCase {
@@ -168,7 +172,7 @@ class RestAPITestBase extends JUnit4DistributedTestCase {
     HttpPost post = new HttpPost(restString);
     post.addHeader("Content-Type", "application/json");
     post.addHeader("Accept", "application/json");
-    if (jsonBody != null && !StringUtils.isEmpty(jsonBody)) {
+    if (StringUtils.isNotEmpty(jsonBody)) {
       StringEntity jsonStringEntity = new StringEntity(jsonBody, ContentType.DEFAULT_TEXT);
       post.setEntity(jsonStringEntity);
     }

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/cache/client/internal/locator/LocatorStatusResponse.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/client/internal/locator/LocatorStatusResponse.java b/geode-core/src/main/java/org/apache/geode/cache/client/internal/locator/LocatorStatusResponse.java
index d531cc1..677db4d 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/client/internal/locator/LocatorStatusResponse.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/client/internal/locator/LocatorStatusResponse.java
@@ -15,6 +15,13 @@
 
 package org.apache.geode.cache.client.internal.locator;
 
+import org.apache.geode.internal.DataSerializableFixedID;
+import org.apache.geode.internal.GemFireVersion;
+import org.apache.geode.internal.lang.ObjectUtils;
+import org.apache.geode.internal.lang.StringUtils;
+import org.apache.geode.internal.process.PidUnavailableException;
+import org.apache.geode.internal.process.ProcessUtils;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -24,13 +31,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.geode.internal.DataSerializableFixedID;
-import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.lang.ObjectUtils;
-import org.apache.geode.internal.lang.StringUtils;
-import org.apache.geode.internal.process.PidUnavailableException;
-import org.apache.geode.internal.process.ProcessUtils;
-
 /**
  * The LocatorStatusResponse class...
  * </p>
@@ -101,7 +101,7 @@ public class LocatorStatusResponse extends ServerLocationResponse {
   @SuppressWarnings("unchecked")
   public List<String> getJvmArgs() {
     return Collections
-        .unmodifiableList(ObjectUtils.defaultIfNull(jvmArgs, Collections.<String>emptyList()));
+        .unmodifiableList(ObjectUtils.defaultIfNull(jvmArgs, Collections.emptyList()));
   }
 
   public Integer getPid() {
@@ -162,12 +162,12 @@ public class LocatorStatusResponse extends ServerLocationResponse {
   }
 
   protected void readWorkingDirectory(final DataInput in) throws IOException {
-    this.workingDirectory = StringUtils.defaultIfBlank(in.readUTF());
+    this.workingDirectory = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   protected void readJvmArguments(final DataInput in) throws IOException {
     final int length = in.readInt();
-    final List<String> jvmArgs = new ArrayList<String>(length);
+    final List<String> jvmArgs = new ArrayList<>(length);
     for (int index = 0; index < length; index++) {
       jvmArgs.add(in.readUTF());
     }
@@ -175,23 +175,23 @@ public class LocatorStatusResponse extends ServerLocationResponse {
   }
 
   protected void readClasspath(final DataInput in) throws IOException {
-    this.classpath = StringUtils.defaultIfBlank(in.readUTF());
+    this.classpath = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   protected void readGemFireVersion(final DataInput in) throws IOException {
-    this.gemfireVersion = StringUtils.defaultIfBlank(in.readUTF());
+    this.gemfireVersion = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   protected void readJavaVersion(final DataInput in) throws IOException {
-    this.javaVersion = StringUtils.defaultIfBlank(in.readUTF());
+    this.javaVersion = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   protected void readLogFile(final DataInput in) throws IOException {
-    this.logFile = StringUtils.defaultIfBlank(in.readUTF());
+    this.logFile = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   protected void readHost(final DataInput in) throws IOException {
-    this.host = StringUtils.defaultIfBlank(in.readUTF());
+    this.host = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   protected void readPort(final DataInput in) throws IOException {
@@ -200,7 +200,7 @@ public class LocatorStatusResponse extends ServerLocationResponse {
   }
 
   protected void readName(final DataInput in) throws IOException {
-    this.name = StringUtils.defaultIfBlank(in.readUTF());
+    this.name = StringUtils.nullifyIfBlank(in.readUTF());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/cache/query/internal/AttributeDescriptor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/AttributeDescriptor.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/AttributeDescriptor.java
index f40ab3e..5bfba0e 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/AttributeDescriptor.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/AttributeDescriptor.java
@@ -15,6 +15,19 @@
 
 package org.apache.geode.cache.query.internal;
 
+import org.apache.geode.cache.EntryDestroyedException;
+import org.apache.geode.cache.query.NameNotFoundException;
+import org.apache.geode.cache.query.QueryInvocationTargetException;
+import org.apache.geode.cache.query.QueryService;
+import org.apache.geode.cache.query.types.ObjectType;
+import org.apache.geode.internal.cache.Token;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.pdx.JSONFormatter;
+import org.apache.geode.pdx.PdxInstance;
+import org.apache.geode.pdx.PdxSerializationException;
+import org.apache.geode.pdx.internal.FieldNotFoundInPdxVersion;
+import org.apache.geode.pdx.internal.PdxInstanceImpl;
+
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
@@ -28,19 +41,6 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import org.apache.geode.cache.EntryDestroyedException;
-import org.apache.geode.cache.query.NameNotFoundException;
-import org.apache.geode.cache.query.QueryInvocationTargetException;
-import org.apache.geode.cache.query.QueryService;
-import org.apache.geode.cache.query.types.ObjectType;
-import org.apache.geode.internal.cache.Token;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.pdx.PdxInstance;
-import org.apache.geode.pdx.PdxSerializationException;
-import org.apache.geode.pdx.internal.FieldNotFoundInPdxVersion;
-import org.apache.geode.pdx.internal.PdxInstanceImpl;
-import org.apache.geode.pdx.JSONFormatter;
-
 /**
  * Utility for managing an attribute
  *
@@ -137,25 +137,6 @@ public class AttributeDescriptor {
   }
 
 
-  /* this method is not yet used. Here to support Update statements */
-  // returns either null or UNDEFINED
-  /*
-   * public Object write(Object target, Object newValue) throws PathEvaluationException { if (target
-   * == null) return QueryService.UNDEFINED;
-   * 
-   * 
-   * Class targetType = target.getClass(); Class argType = newValue == null ? null :
-   * newValue.getClass(); Member m = getWriteMember(targetType, argType); if (m == null) throw new
-   * PathEvaluationException(LocalizedStrings.AttributeDescriptor_NO_UPDATE_PATH_MAPPING_FOUND_FOR_0
-   * .toLocalizedString(_name)); try { if (m instanceof Method) { try { ((Method)m).invoke(target,
-   * new Object[] { newValue }); return null; } catch (InvocationTargetException e) { throw new
-   * PathEvaluationException(e.getTargetException()); } } else { ((Field)m).set(target, newValue);
-   * return null; } } catch (IllegalAccessException e) { throw new PathEvaluationException(e)); }
-   * 
-   * }
-   */
-
-
   Member getReadMember(ObjectType targetType) throws NameNotFoundException {
     return getReadMember(targetType.resolveClass());
   }
@@ -186,14 +167,6 @@ public class AttributeDescriptor {
   }
 
 
-  /*
-   * Not yet used, Here to support Update statements private Member getWriteMember(Class targetType,
-   * Class argType) { // mapping: public field (same name), method (setAttribute(val)), // method
-   * attribute(val) Member m; m = getWriteField(targetType, argType); if (m != null) return m;
-   * return getWriteMethod(targetType, argType); }
-   */
-
-
 
   private Field getReadField(Class targetType) {
     try {
@@ -203,11 +176,6 @@ public class AttributeDescriptor {
     }
   }
 
-  /*
-   * not yet used private Field getWriteField(Class targetType, Class argType) { try { return
-   * targetType.getField(_name); } catch (NoSuchFieldException e) { return null; } }
-   */
-
 
 
   private Method getReadMethod(Class targetType) {
@@ -219,12 +187,6 @@ public class AttributeDescriptor {
     return getReadMethod(targetType, _name);
   }
 
-  /*
-   * not yet used private Method getWriteMethod(Class targetType, Class argType) { Method m; String
-   * beanMethod = "set" + _name.substring(0,1).toUpperCase() + _name.substring(1); m =
-   * getWriteMethod(targetType, argType, beanMethod); if (m != null) return m; return
-   * getWriteMethod(targetType, argType, _name); }
-   */
 
 
   private Method getReadMethod(Class targetType, String methodName) {
@@ -236,12 +198,6 @@ public class AttributeDescriptor {
     }
   }
 
-  /*
-   * not yet used private Method getWriteMethod(Class targetType, Class argType, String methodName)
-   * { try { // @todo look up maximally specific method based on argType return
-   * targetType.getMethod(methodName, new Class[] { argType }); } catch (NoSuchMethodException e) {
-   * return null; } }
-   */
   /**
    * reads field value from a PdxInstance
    * 

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/cache/query/internal/NWayMergeResults.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/NWayMergeResults.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/NWayMergeResults.java
index 4e52a67..1a267d8 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/NWayMergeResults.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/NWayMergeResults.java
@@ -14,19 +14,6 @@
  */
 package org.apache.geode.cache.query.internal;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.AbstractCollection;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
 import org.apache.geode.DataSerializer;
 import org.apache.geode.cache.query.SelectResults;
 import org.apache.geode.cache.query.Struct;
@@ -40,6 +27,19 @@ import org.apache.geode.internal.HeapDataOutputStream;
 import org.apache.geode.internal.HeapDataOutputStream.LongUpdater;
 import org.apache.geode.internal.Version;
 
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.AbstractCollection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
+
 /**
  * The n - way merge results returns a sorted results on the cumulative sorted results for
  * partitioned region based query
@@ -210,11 +210,6 @@ public class NWayMergeResults<E> implements SelectResults<E>, Ordered, DataSeria
 
     }
 
-    /*
-     * @Override public boolean isEmpty() { boolean isEmpty = true; for (SelectResults<E> result :
-     * this.sortedResults) { isEmpty = result.isEmpty(); if (!isEmpty) { break; } } return isEmpty;
-     * }
-     */
 
     @Override
     public Iterator<E> iterator() {

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java
index feba893..007a990 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java
@@ -37,14 +37,11 @@ import org.apache.geode.management.internal.cli.json.GfJsonObject;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.net.BindException;
 import java.net.InetAddress;
 import java.net.URL;
 import java.sql.Timestamp;
 import java.text.SimpleDateFormat;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
@@ -144,7 +141,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
    * @see java.util.Properties
    */
   protected static boolean isSet(final Properties properties, final String propertyName) {
-    return !StringUtils.isBlank(properties.getProperty(propertyName));
+    return StringUtils.isNotBlank(properties.getProperty(propertyName));
   }
 
   /**
@@ -243,7 +240,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
       distributedSystemProperties.putAll(defaults);
     }
 
-    if (!StringUtils.isBlank(getMemberName())) {
+    if (StringUtils.isNotBlank(getMemberName())) {
       distributedSystemProperties.setProperty(NAME, getMemberName());
     }
 
@@ -291,7 +288,13 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
    * @see #getMemberId()
    */
   public String getMember() {
-    return StringUtils.defaultIfBlank(getMemberName(), getMemberId());
+    if (StringUtils.isNotBlank(getMemberName())) {
+      return getMemberName();
+    }
+    if (StringUtils.isNotBlank(getMemberId())) {
+      return getMemberId();
+    }
+    return null;
   }
 
   /**
@@ -501,7 +504,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
 
     // TODO refactor the logic in this method into a DateTimeFormatUtils class
     protected static String toDaysHoursMinutesSeconds(final Long milliseconds) {
-      final StringBuilder buffer = new StringBuilder(StringUtils.EMPTY_STRING);
+      final StringBuilder buffer = new StringBuilder();
 
       if (milliseconds != null) {
         long millisecondsRemaining = milliseconds;
@@ -569,7 +572,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
      * @return a String value containing the JSON representation of this state object.
      */
     public String toJson() {
-      final Map<String, Object> map = new HashMap<String, Object>();
+      final Map<String, Object> map = new HashMap<>();
       map.put(JSON_CLASSPATH, getClasspath());
       map.put(JSON_GEMFIREVERSION, getGemFireVersion());
       map.put(JSON_HOST, getHost());
@@ -778,12 +781,12 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
 
     // the value of a Number as a String, or "" if null
     protected String toString(final Number value) {
-      return StringUtils.valueOf(value, "");
+      return StringUtils.defaultString(value);
     }
 
     // a String concatenation of all values separated by " "
     protected String toString(final Object... values) {
-      return StringUtils.concat(values, " ");
+      return values == null ? "" : StringUtils.join(values, " ");
     }
 
     // the value of the String, or "" if value is null
@@ -805,8 +808,8 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
     private final String description;
 
     Status(final String description) {
-      assert !StringUtils.isBlank(description) : "The Status description must be specified!";
-      this.description = StringUtils.toLowerCase(description);
+      assert StringUtils.isNotBlank(description) : "The Status description must be specified!";
+      this.description = StringUtils.lowerCase(description);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
index 641e009..68aa9db 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
@@ -15,32 +15,42 @@
 
 package org.apache.geode.distributed;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_FILE;
+import static org.apache.geode.distributed.ConfigurationProperties.NAME;
 
-import org.apache.geode.cache.client.internal.locator.*;
+import org.apache.geode.cache.client.internal.locator.LocatorStatusRequest;
+import org.apache.geode.cache.client.internal.locator.LocatorStatusResponse;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.DistributionConfigImpl;
 import org.apache.geode.distributed.internal.InternalLocator;
-import org.apache.geode.distributed.internal.tcpserver.*;
+import org.apache.geode.distributed.internal.tcpserver.TcpClient;
 import org.apache.geode.internal.DistributionLocator;
 import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.lang.ObjectUtils;
 import org.apache.geode.internal.lang.StringUtils;
 import org.apache.geode.internal.lang.SystemUtils;
-import org.apache.geode.internal.process.*;
+import org.apache.geode.internal.net.SocketCreator;
+import org.apache.geode.internal.process.ConnectionFailedException;
+import org.apache.geode.internal.process.ControlNotificationHandler;
+import org.apache.geode.internal.process.ControllableProcess;
+import org.apache.geode.internal.process.FileAlreadyExistsException;
+import org.apache.geode.internal.process.MBeanInvocationFailedException;
+import org.apache.geode.internal.process.PidUnavailableException;
+import org.apache.geode.internal.process.ProcessController;
+import org.apache.geode.internal.process.ProcessControllerFactory;
+import org.apache.geode.internal.process.ProcessControllerParameters;
+import org.apache.geode.internal.process.ProcessLauncherContext;
+import org.apache.geode.internal.process.ProcessType;
+import org.apache.geode.internal.process.ProcessUtils;
+import org.apache.geode.internal.process.StartupStatusListener;
+import org.apache.geode.internal.process.UnableToControlProcessException;
 import org.apache.geode.internal.util.IOUtils;
 import org.apache.geode.lang.AttachAPINotFoundException;
 import org.apache.geode.management.internal.cli.json.GfJsonArray;
 import org.apache.geode.management.internal.cli.json.GfJsonException;
 import org.apache.geode.management.internal.cli.json.GfJsonObject;
-import joptsimple.OptionException;
-import joptsimple.OptionParser;
-import joptsimple.OptionSet;
 
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -48,12 +58,23 @@ import java.lang.management.ManagementFactory;
 import java.net.ConnectException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.logging.Level;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import joptsimple.OptionException;
+import joptsimple.OptionParser;
+import joptsimple.OptionSet;
 
 /**
  * The LocatorLauncher class is a launcher for a GemFire Locator.
@@ -1563,7 +1584,7 @@ public class LocatorLauncher extends AbstractLauncher<String> {
      * @see #getHostnameForClients()
      */
     public Builder setHostnameForClients(final String hostnameForClients) {
-      if (StringUtils.isEmpty(StringUtils.trim(hostnameForClients))) {
+      if (StringUtils.isBlank(hostnameForClients)) {
         throw new IllegalArgumentException(
             LocalizedStrings.LocatorLauncher_Builder_INVALID_HOSTNAME_FOR_CLIENTS_ERROR_MESSAGE
                 .toLocalizedString());
@@ -1591,7 +1612,7 @@ public class LocatorLauncher extends AbstractLauncher<String> {
      * @see #getMemberName()
      */
     public Builder setMemberName(final String memberName) {
-      if (StringUtils.isEmpty(StringUtils.trim(memberName))) {
+      if (StringUtils.isBlank(memberName)) {
         throw new IllegalArgumentException(
             LocalizedStrings.Launcher_Builder_MEMBER_NAME_ERROR_MESSAGE
                 .toLocalizedString("Locator"));
@@ -1707,7 +1728,7 @@ public class LocatorLauncher extends AbstractLauncher<String> {
     }
 
     boolean isWorkingDirectorySpecified() {
-      return !StringUtils.isBlank(this.workingDirectory);
+      return StringUtils.isNotBlank(this.workingDirectory);
     }
 
     /**
@@ -1931,7 +1952,7 @@ public class LocatorLauncher extends AbstractLauncher<String> {
      *         option.
      */
     public boolean hasOption(final String option) {
-      return getOptions().contains(StringUtils.toLowerCase(option));
+      return getOptions().contains(StringUtils.lowerCase(option));
     }
 
     /**
@@ -2043,8 +2064,9 @@ public class LocatorLauncher extends AbstractLauncher<String> {
         if (logFile != null && logFile.isFile()) {
           final String logFileCanonicalPath =
               IOUtils.tryGetCanonicalPathElseGetAbsolutePath(logFile);
-          if (!StringUtils.isBlank(logFileCanonicalPath)) { // this is probably not need but a safe
-                                                            // check none-the-less.
+          if (StringUtils.isNotBlank(logFileCanonicalPath)) { // this is probably not need but a
+                                                              // safe
+            // check none-the-less.
             return logFileCanonicalPath;
           }
         }
@@ -2056,7 +2078,7 @@ public class LocatorLauncher extends AbstractLauncher<String> {
       if (InternalLocator.hasLocator()) {
         final InternalLocator locator = InternalLocator.getLocator();
         final String portAsString = String.valueOf(locator.getPort());
-        if (!StringUtils.isBlank(portAsString)) {
+        if (StringUtils.isNotBlank(portAsString)) {
           return portAsString;
         }
       }

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
index b2d0151..acd5e8a 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
@@ -15,33 +15,9 @@
 
 package org.apache.geode.distributed;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.ServiceLoader;
-import java.util.TreeMap;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import joptsimple.OptionException;
-import joptsimple.OptionParser;
-import joptsimple.OptionSet;
+import static org.apache.geode.distributed.ConfigurationProperties.LOG_FILE;
+import static org.apache.geode.distributed.ConfigurationProperties.NAME;
+import static org.apache.geode.distributed.ConfigurationProperties.SERVER_BIND_ADDRESS;
 
 import org.apache.geode.SystemFailure;
 import org.apache.geode.cache.Cache;
@@ -87,6 +63,30 @@ import org.apache.geode.pdx.PdxSerializer;
 import org.apache.geode.security.AuthenticationRequiredException;
 import org.apache.geode.security.GemFireSecurityException;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.ServiceLoader;
+import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import joptsimple.OptionException;
+import joptsimple.OptionParser;
+import joptsimple.OptionSet;
+
 /**
  * The ServerLauncher class is a launcher class with main method to start a GemFire Server (implying
  * a GemFire Cache Server process).
@@ -366,7 +366,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
     final StringBuilder buffer = new StringBuilder(ServerState.getServerBindAddressAsString(this));
     final String serverPort = ServerState.getServerPortAsString(this);
 
-    if (!StringUtils.isBlank(serverPort)) {
+    if (StringUtils.isNotBlank(serverPort)) {
       buffer.append("[").append(serverPort).append("]");
     }
 
@@ -590,7 +590,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
    *         configuration meta-data.
    */
   public boolean isSpringXmlLocationSpecified() {
-    return !StringUtils.isBlank(this.springXmlLocation);
+    return StringUtils.isNotBlank(this.springXmlLocation);
   }
 
   /**
@@ -1956,7 +1956,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
      * @see #getMemberName()
      */
     public Builder setMemberName(final String memberName) {
-      if (StringUtils.isEmpty(StringUtils.trim(memberName))) {
+      if (StringUtils.isBlank(memberName)) {
         throw new IllegalArgumentException(
             LocalizedStrings.Launcher_Builder_MEMBER_NAME_ERROR_MESSAGE
                 .toLocalizedString("Server"));
@@ -2496,7 +2496,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
     private final String name;
 
     Command(final String name, final String... options) {
-      assert !StringUtils.isBlank(name) : "The name of the command must be specified!";
+      assert StringUtils.isNotBlank(name) : "The name of the command must be specified!";
       this.name = name;
       this.options = (options != null ? Collections.unmodifiableList(Arrays.asList(options))
           : Collections.<String>emptyList());
@@ -2572,7 +2572,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
      *         option.
      */
     public boolean hasOption(final String option) {
-      return getOptions().contains(StringUtils.toLowerCase(option));
+      return getOptions().contains(StringUtils.lowerCase(option));
     }
 
     /**
@@ -2678,7 +2678,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
         if (logFile != null && logFile.isFile()) {
           final String logFileCanonicalPath =
               IOUtils.tryGetCanonicalPathElseGetAbsolutePath(logFile);
-          if (!StringUtils.isBlank(logFileCanonicalPath)) {
+          if (StringUtils.isNotBlank(logFileCanonicalPath)) {
             return logFileCanonicalPath;
           }
         }
@@ -2696,7 +2696,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
         if (csList != null && !csList.isEmpty()) {
           final CacheServer cs = csList.get(0);
           final String serverBindAddressAsString = cs.getBindAddress();
-          if (!StringUtils.isBlank(serverBindAddressAsString)) {
+          if (StringUtils.isNotBlank(serverBindAddressAsString)) {
             return serverBindAddressAsString;
           }
         }
@@ -2714,13 +2714,13 @@ public class ServerLauncher extends AbstractLauncher<String> {
         if (csList != null && !csList.isEmpty()) {
           final CacheServer cs = csList.get(0);
           final String portAsString = String.valueOf(cs.getPort());
-          if (!StringUtils.isBlank(portAsString)) {
+          if (StringUtils.isNotBlank(portAsString)) {
             return portAsString;
           }
         }
       }
 
-      return (launcher.isDisableDefaultServer() ? StringUtils.EMPTY_STRING
+      return (launcher.isDisableDefaultServer() ? StringUtils.EMPTY
           : launcher.getServerPortAsString());
     }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterConfigurationService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterConfigurationService.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterConfigurationService.java
index 10623b4..d990015 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterConfigurationService.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterConfigurationService.java
@@ -14,41 +14,14 @@
  */
 package org.apache.geode.distributed.internal;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.nio.file.Path;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.stream.Collectors;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactoryConfigurationError;
+import static org.apache.geode.distributed.ConfigurationProperties.CLUSTER_CONFIGURATION_DIR;
+import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
+import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_POST_PROCESSOR;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.filefilter.DirectoryFileFilter;
-import org.apache.logging.log4j.Logger;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.CancelException;
 import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.CacheLoaderException;
@@ -69,7 +42,6 @@ import org.apache.geode.internal.cache.persistence.PersistentMemberID;
 import org.apache.geode.internal.cache.persistence.PersistentMemberManager;
 import org.apache.geode.internal.cache.persistence.PersistentMemberPattern;
 import org.apache.geode.internal.cache.xmlcache.CacheXmlGenerator;
-import org.apache.geode.internal.lang.StringUtils;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.management.internal.cli.CliUtil;
 import org.apache.geode.management.internal.configuration.callbacks.ConfigurationChangeListener;
@@ -81,6 +53,34 @@ import org.apache.geode.management.internal.configuration.messages.Configuration
 import org.apache.geode.management.internal.configuration.messages.ConfigurationResponse;
 import org.apache.geode.management.internal.configuration.messages.SharedConfigurationStatusResponse;
 import org.apache.geode.management.internal.configuration.utils.XmlUtils;
+import org.apache.logging.log4j.Logger;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.file.Path;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactoryConfigurationError;
 
 @SuppressWarnings({"deprecation", "unchecked"})
 public class ClusterConfigurationService {

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
index ad5e04d..6500385 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
@@ -14,26 +14,11 @@
  */
 package org.apache.geode.distributed.internal;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
+import static org.apache.geode.distributed.ConfigurationProperties.BIND_ADDRESS;
+import static org.apache.geode.distributed.ConfigurationProperties.CACHE_XML_FILE;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.CancelException;
 import org.apache.geode.cache.CacheFactory;
 import org.apache.geode.cache.GemFireCache;
@@ -69,7 +54,6 @@ import org.apache.geode.internal.logging.LoggingThreadGroup;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 import org.apache.geode.internal.logging.log4j.LogMarker;
 import org.apache.geode.internal.logging.log4j.LogWriterAppenders;
-import org.apache.geode.internal.logging.log4j.LogWriterLogger;
 import org.apache.geode.internal.net.SocketCreator;
 import org.apache.geode.internal.net.SocketCreatorFactory;
 import org.apache.geode.management.internal.JmxManagerLocator;
@@ -81,6 +65,22 @@ import org.apache.geode.management.internal.configuration.handlers.SharedConfigu
 import org.apache.geode.management.internal.configuration.messages.ConfigurationRequest;
 import org.apache.geode.management.internal.configuration.messages.SharedConfigurationStatusRequest;
 import org.apache.geode.management.internal.configuration.messages.SharedConfigurationStatusResponse;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 /**
  * Provides the implementation of a distribution {@code Locator} as well as internal-only
@@ -675,7 +675,7 @@ public class InternalLocator extends Locator implements ConnectListener {
         // this.logger.config("ensuring that this locator is in the locators list");
         boolean setLocatorsProp = false;
         String locatorsProp = this.config.getLocators();
-        if (locatorsProp != null && !locatorsProp.trim().isEmpty()) {
+        if (StringUtils.isNotBlank(locatorsProp)) {
           if (!locatorsProp.contains(thisLocator)) {
             locatorsProp = locatorsProp + ',' + thisLocator;
             setLocatorsProp = true;
@@ -756,7 +756,7 @@ public class InternalLocator extends Locator implements ConnectListener {
    *
    * @since GemFire 5.7
    */
-  void endStartLocator(InternalDistributedSystem distributedSystem) throws UnknownHostException {
+  void endStartLocator(InternalDistributedSystem distributedSystem) {
     this.env = null;
     if (distributedSystem == null) {
       distributedSystem = InternalDistributedSystem.getConnectedInstance();
@@ -1262,7 +1262,7 @@ public class InternalLocator extends Locator implements ConnectListener {
     public Object processRequest(Object request) throws IOException {
       long giveup = 0;
       while (giveup == 0 || System.currentTimeMillis() < giveup) {
-        TcpHandler handler = null;
+        TcpHandler handler;
         if (request instanceof PeerLocatorRequest) {
           handler = this.handlerMapping.get(PeerLocatorRequest.class);
         } else {

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 9dc7fe2..478c4e8 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -14,33 +14,20 @@
  */
 package org.apache.geode.distributed.internal.membership.gms.membership;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.apache.geode.distributed.internal.membership.gms.ServiceConfig.*;
-import static org.apache.geode.internal.DataSerializableFixedID.*;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TimerTask;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.START_LOCATOR;
+import static org.apache.geode.distributed.internal.membership.gms.ServiceConfig.MEMBER_REQUEST_COLLECTION_INTERVAL;
+import static org.apache.geode.internal.DataSerializableFixedID.FIND_COORDINATOR_REQ;
+import static org.apache.geode.internal.DataSerializableFixedID.FIND_COORDINATOR_RESP;
+import static org.apache.geode.internal.DataSerializableFixedID.INSTALL_VIEW_MESSAGE;
+import static org.apache.geode.internal.DataSerializableFixedID.JOIN_REQUEST;
+import static org.apache.geode.internal.DataSerializableFixedID.JOIN_RESPONSE;
+import static org.apache.geode.internal.DataSerializableFixedID.LEAVE_REQUEST_MESSAGE;
+import static org.apache.geode.internal.DataSerializableFixedID.NETWORK_PARTITION_MESSAGE;
+import static org.apache.geode.internal.DataSerializableFixedID.REMOVE_MEMBER_REQUEST;
+import static org.apache.geode.internal.DataSerializableFixedID.VIEW_ACK_MESSAGE;
+
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.GemFireConfigException;
 import org.apache.geode.SystemConnectException;
 import org.apache.geode.distributed.DistributedMember;
@@ -72,6 +59,28 @@ import org.apache.geode.internal.Version;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.security.AuthenticationRequiredException;
 import org.apache.geode.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.TimerTask;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * GMSJoinLeave handles membership communication with other processes in the distributed system. It
@@ -1627,8 +1636,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     this.services = s;
 
     DistributionConfig dc = services.getConfig().getDistributionConfig();
-    if (dc.getMcastPort() != 0 && dc.getLocators().trim().isEmpty()
-        && dc.getStartLocator().trim().isEmpty()) {
+    if (dc.getMcastPort() != 0 && StringUtils.isBlank(dc.getLocators())
+        && StringUtils.isBlank(dc.getStartLocator())) {
       throw new GemFireConfigException("Multicast cannot be configured for a non-distributed cache."
           + "  Please configure the locator services for this cache using " + LOCATORS + " or "
           + START_LOCATOR + ".");

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
index 78b2944..019c35c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
@@ -14,56 +14,7 @@
  */
 package org.apache.geode.internal;
 
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.NotSerializableException;
-import java.io.ObjectInput;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
-import java.io.ObjectStreamClass;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.io.UTFDataFormatException;
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Proxy;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetAddress;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.IdentityHashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.CancelException;
 import org.apache.geode.CanonicalInstantiator;
 import org.apache.geode.DataSerializable;
@@ -115,6 +66,55 @@ import org.apache.geode.pdx.internal.PdxReaderImpl;
 import org.apache.geode.pdx.internal.PdxType;
 import org.apache.geode.pdx.internal.PdxWriterImpl;
 import org.apache.geode.pdx.internal.TypeRegistry;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.EOFException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.NotSerializableException;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.io.UTFDataFormatException;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.TimeUnit;
 
 /**
  * Contains static methods for data serializing instances of internal GemFire classes. It also
@@ -879,8 +879,8 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
       // send it to cache servers if it is a client
       sendRegistrationMessageToServers(s);
     }
-    // send it to all cache clients irelevent of distribute
-    // bridge servers send it all the clients irelevent of
+    // send it to all cache clients irrelevant of distribute
+    // bridge servers send it all the clients irrelevant of
     // originator VM
     sendRegistrationMessageToClients(s);
 
@@ -918,7 +918,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
 
   private static void register(String className, boolean distribute,
       SerializerAttributesHolder holder) {
-    if (className == null || className.trim().isEmpty()) {
+    if (StringUtils.isBlank(className)) {
       throw new IllegalArgumentException("Class name cannot be null or empty.");
     }
 
@@ -1062,9 +1062,9 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
     if (o instanceof DataSerializer) {
       DataSerializer s = (DataSerializer) o;
       Class[] classes = s.getSupportedClasses();
-      for (int i = 0; i < classes.length; i++) {
-        classesToSerializers.remove(classes[i].getName(), s);
-        supportedClassesToHolders.remove(classes[i].getName());
+      for (Class aClass : classes) {
+        classesToSerializers.remove(aClass.getName(), s);
+        supportedClassesToHolders.remove(aClass.getName());
       }
       dsClassesToHolders.remove(s.getClass().getName());
       idsToHolders.remove(idx);
@@ -1185,7 +1185,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
       SerializerAttributesHolder holder = entry.getValue();
       try {
         Class cl = getCachedClass(name);
-        DataSerializer ds = null;
+        DataSerializer ds;
         if (holder.getEventId() != null) {
           ds = register(cl, false, holder.getEventId(), holder.getProxyId());
         } else {
@@ -1404,13 +1404,13 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
     }
     try {
       invokeToData(o, out);
-    } catch (IOException io) {
+    } catch (IOException | CancelException | ToDataException | GemFireRethrowable io) {
       // Note: this is not a user code toData but one from our
       // internal code since only GemFire product code implements DSFID
-      throw io;
-    } catch (CancelException | ToDataException | GemFireRethrowable ex) {
+
       // Serializing a PDX can result in a cache closed exception. Just rethrow
-      throw ex;
+
+      throw io;
     } catch (VirtualMachineError err) {
       SystemFailure.initiateFailure(err);
       // If this ever returns, rethrow the error. We're poisoned
@@ -1726,7 +1726,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
     final int size = readArrayLength(in);
     if (size >= 0) {
       for (int index = 0; index < size; ++index) {
-        E element = DataSerializer.<E>readObject(in);
+        E element = DataSerializer.readObject(in);
         c.add(element);
       }
 
@@ -2582,7 +2582,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
     }
   }
 
-  public static int readDSFIDHeader(final DataInput in) throws IOException, ClassNotFoundException {
+  public static int readDSFIDHeader(final DataInput in) throws IOException {
     checkIn(in);
     byte header = in.readByte();
     if (header == DS_FIXED_ID_BYTE) {
@@ -2666,11 +2666,11 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
       throws IOException, ClassNotFoundException {
     boolean wouldReadSerialized = PdxInstanceImpl.getPdxReadSerialized();
     if (!wouldReadSerialized) {
-      return DataSerializer.<T>readObject(in);
+      return DataSerializer.readObject(in);
     } else {
       PdxInstanceImpl.setPdxReadSerialized(false);
       try {
-        return DataSerializer.<T>readObject(in);
+        return DataSerializer.readObject(in);
       } finally {
         PdxInstanceImpl.setPdxReadSerialized(true);
       }
@@ -2878,7 +2878,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
   }
 
   private static Object readUserDataSerializable(final DataInput in, int classId)
-      throws IOException, ClassNotFoundException {
+      throws IOException {
     Instantiator instantiator = InternalInstantiator.getInstantiator(classId);
     if (instantiator == null) {
       logger.error(LogMarker.SERIALIZER,
@@ -3698,7 +3698,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
         synchronized (cacheAccessLock) {
           Class<?> cachedClass = getExistingCachedClass(className);
           if (cachedClass == null) {
-            classCache.put(className, new WeakReference<Class<?>>(result));
+            classCache.put(className, new WeakReference<>(result));
           } else {
             result = cachedClass;
           }

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteTransportConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteTransportConfig.java b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteTransportConfig.java
index af3cb5d..1dc2fd1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteTransportConfig.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteTransportConfig.java
@@ -14,7 +14,21 @@
  */
 package org.apache.geode.internal.admin.remote;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
+import static org.apache.geode.distributed.ConfigurationProperties.BIND_ADDRESS;
+import static org.apache.geode.distributed.ConfigurationProperties.DISABLE_AUTO_RECONNECT;
+import static org.apache.geode.distributed.ConfigurationProperties.DISABLE_TCP;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_ADDRESS;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
+import static org.apache.geode.distributed.ConfigurationProperties.MEMBERSHIP_PORT_RANGE;
+import static org.apache.geode.distributed.ConfigurationProperties.TCP_PORT;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.admin.SSLConfig;
+import org.apache.geode.internal.admin.TransportConfig;
+import org.apache.geode.internal.i18n.LocalizedStrings;
 
 import java.util.Collection;
 import java.util.Collections;
@@ -24,13 +38,6 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.admin.SSLConfig;
-import org.apache.geode.internal.admin.TransportConfig;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.lang.StringUtils;
-
 /**
  * Tranport config for RemoteGfManagerAgent.
  */
@@ -99,7 +106,7 @@ public class RemoteTransportConfig implements TransportConfig {
       StringTokenizer stringTokenizer = new StringTokenizer(initialHosts, ",");
       while (stringTokenizer.hasMoreTokens()) {
         String locator = stringTokenizer.nextToken();
-        if (!StringUtils.isEmpty(locator)) {
+        if (StringUtils.isNotEmpty(locator)) {
           locators.add(new DistributionLocatorId(locator));
         }
       }

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
index 55e3542..37f2120 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/ClusterConfigurationLoader.java
@@ -17,41 +17,40 @@ package org.apache.geode.internal.cache;
 import static java.util.stream.Collectors.joining;
 import static java.util.stream.Collectors.toList;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Properties;
-import java.util.Set;
-import java.util.stream.Stream;
-
 import org.apache.commons.lang.ArrayUtils;
-import org.apache.geode.internal.ClassPathLoader;
-import org.apache.logging.log4j.Logger;
-
+import org.apache.commons.lang.StringUtils;
 import org.apache.geode.UnmodifiableException;
 import org.apache.geode.cache.Cache;
-import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.ClusterConfigurationService;
+import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.tcpserver.TcpClient;
+import org.apache.geode.internal.ClassPathLoader;
 import org.apache.geode.internal.ConfigSource;
 import org.apache.geode.internal.DeployedJar;
 import org.apache.geode.internal.JarDeployer;
 import org.apache.geode.internal.admin.remote.DistributionLocatorId;
 import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.lang.StringUtils;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.process.ClusterConfigurationNotAvailableException;
 import org.apache.geode.management.internal.configuration.domain.Configuration;
 import org.apache.geode.management.internal.configuration.messages.ConfigurationRequest;
 import org.apache.geode.management.internal.configuration.messages.ConfigurationResponse;
+import org.apache.logging.log4j.Logger;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.Set;
+import java.util.stream.Stream;
 
 public class ClusterConfigurationLoader {
 
@@ -121,7 +120,7 @@ public class ClusterConfigurationLoader {
         requestedConfiguration.get(ClusterConfigurationService.CLUSTER_CONFIG);
     if (clusterConfiguration != null) {
       String cacheXmlContent = clusterConfiguration.getCacheXmlContent();
-      if (!StringUtils.isBlank(cacheXmlContent)) {
+      if (StringUtils.isNotBlank(cacheXmlContent)) {
         cacheXmlContentList.add(cacheXmlContent);
       }
     }
@@ -131,7 +130,7 @@ public class ClusterConfigurationLoader {
       Configuration groupConfiguration = requestedConfiguration.get(group);
       if (groupConfiguration != null) {
         String cacheXmlContent = groupConfiguration.getCacheXmlContent();
-        if (!StringUtils.isBlank(cacheXmlContent)) {
+        if (StringUtils.isNotBlank(cacheXmlContent)) {
           cacheXmlContentList.add(cacheXmlContent);
         }
       }
@@ -230,7 +229,7 @@ public class ClusterConfigurationLoader {
       String ipaddress = dlId.getBindAddress();
       InetAddress locatorInetAddress = null;
 
-      if (!StringUtils.isBlank(ipaddress)) {
+      if (StringUtils.isNotBlank(ipaddress)) {
         locatorInetAddress = InetAddress.getByName(ipaddress);
       } else {
         locatorInetAddress = dlId.getHost();
@@ -265,7 +264,7 @@ public class ClusterConfigurationLoader {
   private static List<String> getGroups(DistributionConfig config) {
     String groupString = config.getGroups();
     List<String> groups = new ArrayList<String>();
-    if (!StringUtils.isBlank(groupString)) {
+    if (StringUtils.isNotBlank(groupString)) {
       groups.addAll((Arrays.asList(groupString.split(","))));
     }
     return groups;

http://git-wip-us.apache.org/repos/asf/geode/blob/d16d192b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
index 185fde7..69684a3 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java
@@ -14,16 +14,8 @@
  */
 package org.apache.geode.internal.cache;
 
-import static org.apache.geode.internal.offheap.annotations.OffHeapIdentifier.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.function.Function;
-
-import org.apache.logging.log4j.Logger;
+import static org.apache.geode.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_NEW_VALUE;
+import static org.apache.geode.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_OLD_VALUE;
 
 import org.apache.geode.CopyHelper;
 import org.apache.geode.DataSerializer;
@@ -83,6 +75,14 @@ import org.apache.geode.internal.offheap.annotations.Unretained;
 import org.apache.geode.internal.util.ArrayUtils;
 import org.apache.geode.internal.util.BlobHelper;
 import org.apache.geode.pdx.internal.PeerTypeRegistration;
+import org.apache.logging.log4j.Logger;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.function.Function;
 
 /**
  * Implementation of an entry event


Mime
View raw message