You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2015/10/19 18:42:20 UTC

incubator-groovy git commit: GROOVY-7623: Use ClassValue by default on IBM Java (closes #137)

Repository: incubator-groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X b536299f5 -> 29c2b52cf


GROOVY-7623: Use ClassValue by default on IBM Java (closes #137)

IBM Java doesn't have the ClassValue garbage collection issue that OpenJDK has (https://bugs.openjdk.java.net/browse/JDK-8136353) so when running on that JVM, enable ClassValue by default.


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 29c2b52cfc2635131195e4138be6bcb358d22e2a
Parents: b536299
Author: Craig Andrews <ca...@integralblue.com>
Authored: Fri Oct 9 12:30:10 2015 -0400
Committer: pascalschumacher <pa...@gmx.net>
Committed: Mon Oct 19 18:41:39 2015 +0200

----------------------------------------------------------------------
 .../org/codehaus/groovy/reflection/GroovyClassValueFactory.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/29c2b52c/src/main/org/codehaus/groovy/reflection/GroovyClassValueFactory.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/reflection/GroovyClassValueFactory.java b/src/main/org/codehaus/groovy/reflection/GroovyClassValueFactory.java
index 64a1608..3b00638 100644
--- a/src/main/org/codehaus/groovy/reflection/GroovyClassValueFactory.java
+++ b/src/main/org/codehaus/groovy/reflection/GroovyClassValueFactory.java
@@ -27,8 +27,9 @@ class GroovyClassValueFactory {
 	 * This flag is introduced as a (hopefully) temporary workaround for a JVM bug, that is to say that using
 	 * ClassValue prevents the classes and classloaders from being unloaded.
 	 * See https://bugs.openjdk.java.net/browse/JDK-8136353
+	 * This issue does not exist on IBM Java (J9) so use ClassValue by default on that JVM. 
 	 */
-	private final static boolean USE_CLASSVALUE = Boolean.valueOf(System.getProperty("groovy.use.classvalue", "false"));
+	private final static boolean USE_CLASSVALUE = Boolean.valueOf(System.getProperty("groovy.use.classvalue", "IBM J9 VM".equals(System.getProperty("java.vm.name"))?"true":"false"));
 
 	private static final Constructor groovyClassValueConstructor;