commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1746221 - /commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
Date Tue, 31 May 2016 05:11:06 GMT
Author: ggregory
Date: Tue May 31 05:11:06 2016
New Revision: 1746221

URL: http://svn.apache.org/viewvc?rev=1746221&view=rev
Log:
No need to avoid running tests on JVMs older than 1.5 since we require 1.5.

Modified:
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java?rev=1746221&r1=1746220&r2=1746221&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
Tue May 31 05:11:06 2016
@@ -51,9 +51,6 @@ public class MemoryLeakTestCase extends
      * Tests that PropertyUtilsBean's descriptorsCache doesn't cause a memory leak.
      */
     public void testPropertyUtilsBean_descriptorsCache_memoryLeak() throws Exception {
-        if (isPre15JVM()) {
-            return;
-        }
 
         // Clear All BeanUtils caches before the test
         clearAllBeanUtilsCaches();
@@ -100,9 +97,6 @@ public class MemoryLeakTestCase extends
      * Tests that PropertyUtilsBean's mappedDescriptorsCache doesn't cause a memory leak.
      */
     public void testPropertyUtilsBean_mappedDescriptorsCache_memoryLeak() throws Exception
{
-        if (isPre15JVM()) {
-            return;
-        }
 
         // Clear All BeanUtils caches before the test
         clearAllBeanUtilsCaches();
@@ -296,9 +290,6 @@ public class MemoryLeakTestCase extends
      * Tests that WrapDynaClass's dynaClasses doesn't cause a memory leak.
      */
     public void testWrapDynaClass_dynaClasses_memoryLeak() throws Exception {
-        if (isPre15JVM()) {
-            return;
-        }
 
         // Clear All BeanUtils caches before the test
         clearAllBeanUtilsCaches();
@@ -548,33 +539,6 @@ public class MemoryLeakTestCase extends
     }
 
     /**
-     * Test for JDK 1.5
-     */
-    private boolean isPre15JVM() {
-        final String version = System.getProperty("java.specification.version");
-        final StringTokenizer tokenizer = new StringTokenizer(version,".");
-        if (tokenizer.nextToken().equals("1")) {
-            final String minorVersion = tokenizer.nextToken();
-            if (minorVersion.equals("0")) {
-                return true;
-            }
-            if (minorVersion.equals("1")) {
-                return true;
-            }
-            if (minorVersion.equals("2")) {
-                return true;
-            }
-            if (minorVersion.equals("3")) {
-                return true;
-            }
-            if (minorVersion.equals("4")) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
      * Get the total, free, used memory stats.
      * @return the total, free, used memory stats
      */



Mime
View raw message