You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2017/03/03 22:51:18 UTC

geode git commit: GEODE_1793 spotless fixes and removal of dead code

Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-1793 866dc5ca1 -> 6e0af9a3c


GEODE_1793 spotless fixes and removal of dead code


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

Branch: refs/heads/feature/GEODE-1793
Commit: 6e0af9a3c9670a1659805e0f7cad38c412453e16
Parents: 866dc5c
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Mar 3 14:50:33 2017 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Mar 3 14:50:33 2017 -0800

----------------------------------------------------------------------
 .../internal/tcpserver/TcpServer.java            |  6 +++---
 .../geode/distributed/LocatorDUnitTest.java      | 19 +------------------
 2 files changed, 4 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/6e0af9a3/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
index 8f1b537..9845bf1 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
@@ -89,7 +89,7 @@ public class TcpServer {
   // This GOSSIPVERSION is used in _getVersionForAddress request for getting GemFire version of a
   // GossipServer.
   public final static int OLDGOSSIPVERSION = 1001;
-  
+
   private static/* GemStoneAddition */ final Map GOSSIP_TO_GEMFIRE_VERSION_MAP = new HashMap();
 
   // For test purpose only
@@ -364,8 +364,8 @@ public class TcpServer {
             sock.getOutputStream().write("unknown protocol version".getBytes());
             sock.getOutputStream().flush();
           } catch (IOException e) {
-            log.debug("exception in sending reply to process using unknown protocol "
-                + gossipVersion, e);
+            log.debug(
+                "exception in sending reply to process using unknown protocol " + gossipVersion, e);
           }
           sock.close();
           return;

http://git-wip-us.apache.org/repos/asf/geode/blob/6e0af9a3/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
index 5812e74..6f01f90 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorDUnitTest.java
@@ -308,14 +308,11 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   private Boolean startLocatorWithPortAndProperties(final int port, final Properties properties)
       throws IOException {
     try {
-//      System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout. default is 17000ms
       Locator.startLocatorAndDS(port, new File(""), properties);
     } catch (SystemConnectException e) {
       return Boolean.FALSE;
     } catch (GemFireConfigException e) {
       return Boolean.FALSE;
-    } finally {
-//      System.getProperties().remove("p2p.joinTimeout");
     }
     return Boolean.TRUE;
   }
@@ -635,12 +632,7 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
   private Locator startLocatorInternal(final int port, final Properties properties)
       throws IOException {
     Locator locator;
-    try {
-//      System.setProperty("p2p.joinTimeout", "5000"); // set a short join timeout. default is 17000ms
-      locator = Locator.startLocatorAndDS(port, new File(""), properties);
-    } finally {
-//      System.getProperties().remove("p2p.joinTimeout");
-    }
+    locator = Locator.startLocatorAndDS(port, new File(""), properties);
     return locator;
   }
 
@@ -1305,7 +1297,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     bgexecLogger.info(addExpected);
 
     boolean exceptionOccurred = true;
-//    String oldValue = (String) System.getProperties().put("p2p.joinTimeout", "15000");
     try {
       DistributedSystem.connect(props);
       exceptionOccurred = false;
@@ -1322,11 +1313,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       // if expected then add in a catch block for it above this catch
       org.apache.geode.test.dunit.Assert.fail("Failed with unexpected exception", ex);
     } finally {
-//      if (oldValue == null) {
-//        System.getProperties().remove("p2p.joinTimeout");
-//      } else {
-//        System.getProperties().put("p2p.joinTimeout", oldValue);
-//      }
       bgexecLogger.info(removeExpected);
     }
 
@@ -1360,7 +1346,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
 
       SerializableRunnable connect = new SerializableRunnable("Connect to " + locators) {
         public void run() {
-          // System.setProperty("p2p.joinTimeout", "5000");
           Properties props = new Properties();
           props.setProperty(MCAST_PORT, "0");
           props.setProperty(LOCATORS, locators);
@@ -1962,7 +1947,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
     File logFile = new File("");
     try {
       System.setProperty(InternalLocator.LOCATORS_PREFERRED_AS_COORDINATORS, "true");
-//      System.setProperty("p2p.joinTimeout", "1000");
       Properties locProps = new Properties();
       locProps.put(MCAST_PORT, "0");
       locProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
@@ -1972,7 +1956,6 @@ public class LocatorDUnitTest extends JUnit4DistributedTestCase {
       org.apache.geode.test.dunit.Assert.fail("While starting locator on port " + port, ex);
     } finally {
       System.getProperties().remove(InternalLocator.LOCATORS_PREFERRED_AS_COORDINATORS);
-//      System.getProperties().remove("p2p.joinTimeout");
     }
   }