velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1760338 - /velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
Date Mon, 12 Sep 2016 11:49:15 GMT
Author: cbrisson
Date: Mon Sep 12 11:49:15 2016
New Revision: 1760338

URL: http://svn.apache.org/viewvc?rev=1760338&view=rev
Log:
VelTools66TestCase is obsolete in JDK 8

Modified:
    velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java?rev=1760338&r1=1760337&r2=1760338&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/VelTools66TestCase.java
Mon Sep 12 11:49:15 2016
@@ -78,10 +78,19 @@ public class VelTools66TestCase
     public void testVelTools66()
             throws Exception
     {
+        /* the testcase is obsolete in JDK 8, as SystemManager.checkMemberAccess is not anymore
called
+         * by Class.getMethods() */
+        
+        int javaVersion = Integer.parseInt(System.getProperty("java.version").split("\\.")[1]);
+        if (javaVersion >= 8)
+        {
+            return;
+        }
+
         Method verifyMethod = TestInterface.class.getMethod("getTestValue", new Class[0]);
 
         RuntimeInstance ri = new RuntimeInstance();
-        log = new TestLogger();
+        log = new TestLogger(false, false);
         Introspector introspector = new Introspector(log);
 
         Method testMethod = introspector.getMethod(TestObject.class, "getTestValue", new
Object[0]);



Mime
View raw message