geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aba...@apache.org
Subject incubator-geode git commit: GEODE-1808 Remove broken check for jdk1.7.0_72
Date Thu, 10 Nov 2016 15:33:17 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 7973d578e -> e7e372368


GEODE-1808 Remove broken check for jdk1.7.0_72

The logic for evaluating jdk versions is incorrect for 3-digit builds.
Since we require a jdk1.8 version anyway, remove the check.


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

Branch: refs/heads/develop
Commit: e7e372368941dc391669015716e7e03f1e163679
Parents: 7973d57
Author: Anthony Baker <abaker@apache.org>
Authored: Tue Nov 8 09:31:10 2016 -0800
Committer: Anthony Baker <abaker@apache.org>
Committed: Thu Nov 10 07:27:16 2016 -0800

----------------------------------------------------------------------
 .../geode/internal/cache/GemFireCacheImpl.java  |  2 -
 .../cache/MinimumSystemRequirements.java        | 90 --------------------
 .../internal/lang/SystemUtilsJUnitTest.java     |  3 +-
 3 files changed, 1 insertion(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e7e37236/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index e1b2007..7b2e7ca 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -1186,8 +1186,6 @@ public class GemFireCacheImpl
     GemFireCacheImpl.instance = this;
     GemFireCacheImpl.pdxInstance = this;
 
-    MinimumSystemRequirements.checkAndLog();
-
     for (Iterator<CacheLifecycleListener> iter = cacheLifecycleListeners.iterator();
iter
         .hasNext();) {
       CacheLifecycleListener listener = (CacheLifecycleListener) iter.next();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e7e37236/geode-core/src/main/java/org/apache/geode/internal/cache/MinimumSystemRequirements.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/MinimumSystemRequirements.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/MinimumSystemRequirements.java
deleted file mode 100644
index a2c1874..0000000
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/MinimumSystemRequirements.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information
regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain
a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
- * or implied. See the License for the specific language governing permissions and limitations
under
- * the License.
- */
-
-package org.apache.geode.internal.cache;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.lang.SystemUtils;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.log4j.LocalizedMessage;
-
-/**
- * Checks that minimum system requirements are met.
- * 
- *
- * @since GemFire 8.1
- */
-public final class MinimumSystemRequirements {
-
-  public static final String JAVA_VERSION = "1.7.0_72";
-
-  private static final Logger logger = LogService.getLogger();
-
-  private MinimumSystemRequirements() {
-    // static only
-  }
-
-  /**
-   * Asserts minimum system requirements, logs any violations and forces exit.
-   * 
-   * @see #checkAndLog()
-   * 
-   * @since GemFire 8.1
-   */
-  public static void assertLogAndExit() {
-    if (!checkAndLog()) {
-      System.exit(1);
-    }
-  }
-
-  /**
-   * Checks minimum system requirements and logs any violations.
-   * 
-   * @return true if minimum system requirements met, otherwise false.
-   * 
-   * @since GemFire 8.1
-   */
-  public static boolean checkAndLog() {
-    boolean minimumSystemRequirementsMet = true;
-
-    minimumSystemRequirementsMet &= checkJavaVersion();
-
-    if (!minimumSystemRequirementsMet) {
-      logger.warn(LocalizedMessage.create(LocalizedStrings.MinimumSystemRequirements_NOT_MET));
-    }
-
-    return minimumSystemRequirementsMet;
-  }
-
-  /**
-   * Check Java version at least {@link #JAVA_VERSION}.
-   * 
-   * @return true if minimum system requirements met, otherwise false.
-   * 
-   * @since GemFire 8.1
-   */
-  private static boolean checkJavaVersion() {
-    if (SystemUtils.isJavaVersionAtLeast(JAVA_VERSION)) {
-      return true;
-    }
-
-    logger.warn(LocalizedMessage.create(LocalizedStrings.MinimumSystemRequirements_JAVA_VERSION,
-        JAVA_VERSION));
-    return false;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e7e37236/geode-core/src/test/java/org/apache/geode/internal/lang/SystemUtilsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/lang/SystemUtilsJUnitTest.java
b/geode-core/src/test/java/org/apache/geode/internal/lang/SystemUtilsJUnitTest.java
index fbe18d0..48f176e 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/lang/SystemUtilsJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/lang/SystemUtilsJUnitTest.java
@@ -44,8 +44,7 @@ public class SystemUtilsJUnitTest {
     // note, the expected version value should be set to the minimum supported version of
the Java
     // Runtime Environment
     // (JRE) for GemFire
-    assertTrue(SystemUtils.isJavaVersionAtLeast("1.7"));
-    assertTrue(SystemUtils.isJavaVersionAtLeast("1.7.0_72"));
+    assertTrue(SystemUtils.isJavaVersionAtLeast("1.8"));
     // note, the expected version value should be set to the next version of the Java Runtime
     // Environment (JRE)
     // not currently available.


Mime
View raw message