You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by jw...@apache.org on 2016/01/07 00:25:27 UTC
[1/3] groovy git commit: [build] Remove javax.script pre-JDK6
dependency (closes #234)
Repository: groovy
Updated Branches:
refs/heads/master b183bee66 -> f40309942
[build] Remove javax.script pre-JDK6 dependency (closes #234)
Minimum jdk is now 6 so no longer need compatibility dependency.
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/b03f2b9f
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/b03f2b9f
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/b03f2b9f
Branch: refs/heads/master
Commit: b03f2b9f9ffab0879ff6a216fd6e696f4e29e6b2
Parents: b183bee
Author: John Wagenleitner <jw...@apache.org>
Authored: Tue Jan 5 20:52:06 2016 -0800
Committer: John Wagenleitner <jw...@apache.org>
Committed: Wed Jan 6 14:18:26 2016 -0800
----------------------------------------------------------------------
subprojects/groovy-jsr223/build.gradle | 15 ---------------
1 file changed, 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/b03f2b9f/subprojects/groovy-jsr223/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/groovy-jsr223/build.gradle b/subprojects/groovy-jsr223/build.gradle
index 3ce88b3..ba9730f 100644
--- a/subprojects/groovy-jsr223/build.gradle
+++ b/subprojects/groovy-jsr223/build.gradle
@@ -16,22 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-ext.scriptingCapable = {
- // TODO remove this eventually - will break compiling on JDK 5
- try {
- Class.forName('javax.script.ScriptEngine')
- } catch (e) {
- return false
- }
- true
-}
-
dependencies {
- if (!scriptingCapable()) {
- compile('org.livetribe:livetribe-jsr223:2.0.6') { dep ->
- provided dep
- }
- }
compile rootProject
testCompile project(':groovy-test')
}
[3/3] groovy git commit: Remove jdk5 checks (closes #235)
Posted by jw...@apache.org.
Remove jdk5 checks (closes #235)
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/f4030994
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/f4030994
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/f4030994
Branch: refs/heads/master
Commit: f403099421df866174893a794d3f1ef5e6658ba6
Parents: efe8fdb
Author: John Wagenleitner <jw...@apache.org>
Authored: Tue Jan 5 21:12:51 2016 -0800
Committer: John Wagenleitner <jw...@apache.org>
Committed: Wed Jan 6 14:19:45 2016 -0800
----------------------------------------------------------------------
.../main/groovy/groovy/ui/view/GTKDefaults.groovy | 16 ----------------
.../org/codehaus/groovy/testng/TestNgRunner.java | 4 ----
2 files changed, 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/f4030994/subprojects/groovy-console/src/main/groovy/groovy/ui/view/GTKDefaults.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-console/src/main/groovy/groovy/ui/view/GTKDefaults.groovy b/subprojects/groovy-console/src/main/groovy/groovy/ui/view/GTKDefaults.groovy
index 8b16a59..8e16590 100644
--- a/subprojects/groovy-console/src/main/groovy/groovy/ui/view/GTKDefaults.groovy
+++ b/subprojects/groovy-console/src/main/groovy/groovy/ui/view/GTKDefaults.groovy
@@ -34,22 +34,6 @@ def fontFamily = prefs.get("fontName", "DejaVu Sans Mono")
styles.regular[StyleConstants.FontFamily] = fontFamily
styles[StyleContext.DEFAULT_STYLE][StyleConstants.FontFamily] = fontFamily
-// possibly change look and feel
-if (System.properties['java.version'] =~ /^1\.5/) {
- // GTK wasn't where it needed to be in 1.5, especially with toolbars
- // use metal instead
- lookAndFeel('metal', boldFonts:false)
-
- // we also need to turn on anti-aliasing ourselves
- key = InvokerHelper.getProperty('com.sun.java.swing.SwingUtilities2' as Class,
- 'AA_TEXT_PROPERTY_KEY')
- addAttributeDelegate {builder, node, attributes ->
- if (node instanceof JComponent) {
- node.putClientProperty(key, new Boolean(true));
- }
- }
-}
-
// some current distros (Ubuntu 7.10) have broken printing support :(
// detect it and disable it
try {
http://git-wip-us.apache.org/repos/asf/groovy/blob/f4030994/subprojects/groovy-testng/src/main/java/org/codehaus/groovy/testng/TestNgRunner.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-testng/src/main/java/org/codehaus/groovy/testng/TestNgRunner.java b/subprojects/groovy-testng/src/main/java/org/codehaus/groovy/testng/TestNgRunner.java
index f5fe867..fa8dfee 100644
--- a/subprojects/groovy-testng/src/main/java/org/codehaus/groovy/testng/TestNgRunner.java
+++ b/subprojects/groovy-testng/src/main/java/org/codehaus/groovy/testng/TestNgRunner.java
@@ -44,10 +44,6 @@ public class TestNgRunner implements GroovyRunner {
*/
@SuppressWarnings("unchecked")
public boolean canRun(Class scriptClass, GroovyClassLoader loader) {
- char version = System.getProperty("java.version").charAt(2);
- if (version < '5') {
- return false;
- }
// check if there are appropriate class or method annotations
// that suggest we have a TestNG test
boolean isTest = false;
[2/3] groovy git commit: Remove checks for jdk5 in tests
Posted by jw...@apache.org.
Remove checks for jdk5 in tests
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/efe8fdb5
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/efe8fdb5
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/efe8fdb5
Branch: refs/heads/master
Commit: efe8fdb593b4d02defd44f29eb9c39756c8dedeb
Parents: b03f2b9
Author: John Wagenleitner <jw...@apache.org>
Authored: Tue Jan 5 21:11:22 2016 -0800
Committer: John Wagenleitner <jw...@apache.org>
Committed: Wed Jan 6 14:19:39 2016 -0800
----------------------------------------------------------------------
src/test/groovy/bugs/Groovy3175_Bug.groovy | 5 ---
.../groovy/lang/InnerClassResolvingTest.groovy | 43 +++++++++-----------
2 files changed, 19 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/efe8fdb5/src/test/groovy/bugs/Groovy3175_Bug.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/bugs/Groovy3175_Bug.groovy b/src/test/groovy/bugs/Groovy3175_Bug.groovy
index f868af7..a2b309b 100644
--- a/src/test/groovy/bugs/Groovy3175_Bug.groovy
+++ b/src/test/groovy/bugs/Groovy3175_Bug.groovy
@@ -20,12 +20,7 @@ package groovy.bugs
public class Groovy3175_Bug extends GroovyTestCase {
- def getJavaVersionMajorMinor() { (System.getProperty('java.version') =~ /^\d+\.?\d*/)[0] as BigDecimal }
-
void testSyntheticModifier() {
- if (getJavaVersionMajorMinor() < 1.5)
- return
-
assertScript """
class MyService {
private fio
http://git-wip-us.apache.org/repos/asf/groovy/blob/efe8fdb5/src/test/groovy/lang/InnerClassResolvingTest.groovy
----------------------------------------------------------------------
diff --git a/src/test/groovy/lang/InnerClassResolvingTest.groovy b/src/test/groovy/lang/InnerClassResolvingTest.groovy
index 0e9a00b..4060ecc 100644
--- a/src/test/groovy/lang/InnerClassResolvingTest.groovy
+++ b/src/test/groovy/lang/InnerClassResolvingTest.groovy
@@ -21,30 +21,25 @@ package groovy.lang
class InnerClassResolvingTest extends GroovyTestCase {
public void testInnerClass() {
// Thread.UncaughtExceptionHandler was added in Java 1.5
- if (System.properties.'java.version'[2] >= '5') {
- def script = '''
- def caught = false
- def t = Thread.start {
- Thread.setDefaultUncaughtExceptionHandler(
- {thread,ex -> caught=true} as Thread.UncaughtExceptionHandler)
- throw new Exception("huhu")
- }
- t.join()
- assert caught==true
- '''
- new GroovyShell().evaluate(script)
- }
- }
-
+ def script = '''
+ def caught = false
+ def t = Thread.start {
+ Thread.setDefaultUncaughtExceptionHandler(
+ {thread,ex -> caught=true} as Thread.UncaughtExceptionHandler)
+ throw new Exception("huhu")
+ }
+ t.join()
+ assert caught==true
+ '''
+ new GroovyShell().evaluate(script)
+ }
+
public void testInnerClassWithPartialMatchOnImport() {
- if (System.properties.'java.version'[2] >= '5') {
- def script = '''
- import java.lang.Thread as X
- X.UncaughtExceptionHandler y = null
- '''
- new GroovyShell().evaluate(script)
- }
- }
-
+ def script = '''
+ import java.lang.Thread as X
+ X.UncaughtExceptionHandler y = null
+ '''
+ new GroovyShell().evaluate(script)
+ }
}