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/10 10:07:02 UTC

[1/2] incubator-groovy git commit: Documentation: Groovy requires at least Java 6, so remove some parts which refer to older Java versions.

Repository: incubator-groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 56aba924a -> f43e77cf8


Documentation: Groovy requires at least Java 6, so remove some parts which refer to older Java versions.


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 1167e320a69e39040914e410c0e2d485a99ee4cb
Parents: 56aba92
Author: pascalschumacher <pa...@gmx.net>
Authored: Sat Oct 10 10:05:17 2015 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sat Oct 10 10:06:05 2015 +0200

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java    | 2 +-
 src/spec/doc/core-syntax.adoc                                    | 4 +++-
 src/spec/doc/design-pattern-singleton.adoc                       | 2 +-
 subprojects/groovy-jmx/src/spec/doc/jmx.adoc                     | 2 +-
 .../groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy     | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/1167e320/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java b/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
index 324670f..262700c 100644
--- a/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
+++ b/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
@@ -177,7 +177,7 @@ public class StringGroovyMethods extends DefaultGroovyMethodsSupport {
      * <li>Double</li>
      * <li>Float</li>
      * <li>File</li>
-     * <li>Subclasses of Enum (Java 5 and above)</li>
+     * <li>Subclasses of Enum</li>
      * </ul>
      * If any other type is given, the call is delegated to
      * {@link org.codehaus.groovy.runtime.DefaultGroovyMethods#asType(Object, Class)}.

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/1167e320/src/spec/doc/core-syntax.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/core-syntax.adoc b/src/spec/doc/core-syntax.adoc
index 7ffee53..0e04832 100644
--- a/src/spec/doc/core-syntax.adoc
+++ b/src/spec/doc/core-syntax.adoc
@@ -648,9 +648,11 @@ include::{projectdir}/src/spec/test/SyntaxTest.groovy[tags=wide_int_negative,ind
 
 ==== Alternative non-base 10 representations
 
+Numbers can also be represented in binary, octal, hexadecimal and decimal bases.
+
 ===== Binary literal
 
-In Java 6 and before, as well as in Groovy, numbers could be represented in decimal, octal and hexadecimal bases, and with Java 7 and Groovy 2, you can use a binary notation with the `0b` prefix:
+Binary numbers start with a `0b` prefix:
 
 [source,groovy]
 ----

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/1167e320/src/spec/doc/design-pattern-singleton.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/design-pattern-singleton.adoc b/src/spec/doc/design-pattern-singleton.adoc
index 1ef58b7..f19b1b6 100644
--- a/src/spec/doc/design-pattern-singleton.adoc
+++ b/src/spec/doc/design-pattern-singleton.adoc
@@ -65,7 +65,7 @@ Collector:15959960, Votes:2
 Variations to this pattern:
 
 - To support lazy-loading and multi-threading, we could just use the `synchronized` keyword with the `getInstance()` method. This has a performance hit but will work.
-- We can consider variations involving double-checked locking and the `volatile` keyword (for Java 5 and above), but see the limitations of this approach http://www.ibm.com/developerworks/java/library/j-dcl/index.html[here].
+- We can consider variations involving double-checked locking and the `volatile` keyword, but see the limitations of this approach http://www.ibm.com/developerworks/java/library/j-dcl/index.html[here].
 
 == Example: Singleton via MetaProgramming
 

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/1167e320/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-jmx/src/spec/doc/jmx.adoc b/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
index 5263a73..1d90e34 100644
--- a/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
+++ b/subprojects/groovy-jmx/src/spec/doc/jmx.adoc
@@ -48,7 +48,7 @@ The remainder of this page shows you how to:
 
 == Monitoring the JVM
 
-MBeans are not accessed directly by an application but are managed by a repository called an __MBean server__. Java 5 and above includes a special MBean server called the __platform MBean server__, which is built into the JVM. Platform MBeans are registered in this server using unique names.
+MBeans are not accessed directly by an application but are managed by a repository called an __MBean server__. Java includes a special MBean server called the __platform MBean server__, which is built into the JVM. Platform MBeans are registered in this server using unique names.
 
 You can monitor the JVM through its platform MBeans with the following code:
 

http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/1167e320/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
----------------------------------------------------------------------
diff --git a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
index eb94353..9ed2879 100644
--- a/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
+++ b/subprojects/groovy-xml/src/main/groovy/groovy/xml/StaxBuilder.groovy
@@ -20,7 +20,7 @@ package groovy.xml
 
 /**
  * A Groovy builder that works with Stax processors.
- * Using Java 6, typical usage is as follows:
+ * A typical usage is as follows:
  * <pre>
  * def factory = XMLOutputFactory.newInstance()
  * def writer = new StringWriter()


[2/2] incubator-groovy git commit: remove check for java 4 and below from isJUnit4Test method

Posted by pa...@apache.org.
remove check for java 4 and below from isJUnit4Test method


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

Branch: refs/heads/GROOVY_2_4_X
Commit: f43e77cf804b32d4bfff1c533e25951c2dfded80
Parents: 1167e32
Author: pascalschumacher <pa...@gmx.net>
Authored: Sat Oct 10 09:45:18 2015 +0200
Committer: pascalschumacher <pa...@gmx.net>
Committed: Sat Oct 10 10:06:43 2015 +0200

----------------------------------------------------------------------
 src/main/groovy/lang/GroovyShell.java | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/f43e77cf/src/main/groovy/lang/GroovyShell.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/GroovyShell.java b/src/main/groovy/lang/GroovyShell.java
index d9c6564..a1af1c3 100644
--- a/src/main/groovy/lang/GroovyShell.java
+++ b/src/main/groovy/lang/GroovyShell.java
@@ -466,12 +466,6 @@ public class GroovyShell extends GroovyObjectSupport {
      * @return true if the class appears to be a test
      */
     private boolean isJUnit4Test(Class scriptClass) {
-        // if we are running under Java 1.4 don't bother trying to check
-        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 JUnit 4 test
         boolean isTest = false;