You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2022/02/19 18:18:41 UTC
[groovy] 03/03: fix for JDK7
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 98e84fc7ad178523c93f1cabd5b3f1e776bf32c2
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Sat Feb 19 12:18:21 2022 -0600
fix for JDK7
---
src/main/groovy/groovy/grape/GrapeIvy.groovy | 2 +-
src/test/groovy/bugs/Groovy8964Bug.groovy | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/groovy/groovy/grape/GrapeIvy.groovy b/src/main/groovy/groovy/grape/GrapeIvy.groovy
index 9939bbf..417fe39 100644
--- a/src/main/groovy/groovy/grape/GrapeIvy.groovy
+++ b/src/main/groovy/groovy/grape/GrapeIvy.groovy
@@ -763,7 +763,7 @@ class GrapeIvy implements GrapeEngine {
def resolver = new IBiblioResolver(
name: (String) args.name,
root: (String) args.root,
- m2compatible: (boolean) args.getOrDefault('m2Compatible', Boolean.TRUE),
+ m2compatible: !Boolean.FALSE.equals(args.get('m2Compatible')),
settings: (ResolverSettings) settings
)
diff --git a/src/test/groovy/bugs/Groovy8964Bug.groovy b/src/test/groovy/bugs/Groovy8964Bug.groovy
index a5285bb..a1b30a6 100644
--- a/src/test/groovy/bugs/Groovy8964Bug.groovy
+++ b/src/test/groovy/bugs/Groovy8964Bug.groovy
@@ -77,6 +77,8 @@ class Groovy8964Bug extends GroovyTestCase {
// GROOVY-10379
void testInstanceMethodNotMaskedByStaticMethodWithSameNumberOfArgs3() {
+ if (!groovy.test.GroovyAssert.isAtLeastJdk('1.8')) return
+
def config = new CompilerConfiguration(
targetDirectory: File.createTempDir(),
jointCompilationOptions: [stubDir: File.createTempDir()]