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 2019/03/24 23:57:48 UTC

[groovy] branch master updated (00ee054 -> fa6585a)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git.


    from 00ee054  Add openjdk12 build
     new 30871ba  some useful commented-out flags for build
     new fa6585a  remove a couple of checkstyle warnings

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle                                                        | 2 ++
 .../src/main/groovy/groovy/text/XmlTemplateEngine.java              | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)


[groovy] 02/02: remove a couple of checkstyle warnings

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit fa6585a1a4d81128d2a491efea249d66d29bc432
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Mar 25 09:57:21 2019 +1000

    remove a couple of checkstyle warnings
---
 .../src/main/groovy/groovy/text/XmlTemplateEngine.java              | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/subprojects/groovy-templates/src/main/groovy/groovy/text/XmlTemplateEngine.java b/subprojects/groovy-templates/src/main/groovy/groovy/text/XmlTemplateEngine.java
index 27e2599..6f505af 100644
--- a/subprojects/groovy-templates/src/main/groovy/groovy/text/XmlTemplateEngine.java
+++ b/subprojects/groovy-templates/src/main/groovy/groovy/text/XmlTemplateEngine.java
@@ -197,7 +197,7 @@ public class XmlTemplateEngine extends TemplateEngine {
 
         protected boolean printSpecialNode(Node node) {
             Object name = node.name();
-            if (name != null && name instanceof QName) {
+            if (name instanceof QName) {
                 QName qn = (QName) name;
                 // check uri and for legacy cases just check prefix name (not recommended)
                 if (qn.getNamespaceURI().equals("http://groovy.codehaus.org/2005/gsp") || qn.getPrefix().equals("gsp")) {
@@ -242,7 +242,7 @@ public class XmlTemplateEngine extends TemplateEngine {
         public XmlWritable(Script script, Binding binding) {
             this.script = script;
             this.binding = binding;
-            this.result = new WeakReference(null);
+            this.result = new WeakReference<>(null);
         }
 
         public Writer writeTo(Writer out) {
@@ -259,7 +259,7 @@ public class XmlTemplateEngine extends TemplateEngine {
                 return result.get().toString();
             }
             String string = writeTo(new StringBuilderWriter(1024)).toString();
-            result = new WeakReference(string);
+            result = new WeakReference<>(string);
             return string;
         }
     }


[groovy] 01/02: some useful commented-out flags for build

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 30871badee3d957ccf2b43dce85c0ecfaa3f525a
Author: Paul King <pa...@asert.com.au>
AuthorDate: Mon Mar 25 09:56:48 2019 +1000

    some useful commented-out flags for build
---
 build.gradle | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/build.gradle b/build.gradle
index b8c5182..8688e13 100644
--- a/build.gradle
+++ b/build.gradle
@@ -375,6 +375,7 @@ allprojects {
     tasks.withType(JavaCompile) {
         options.encoding = 'UTF-8'
         options.incremental = true
+//        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
 
         if (classpath) {
             classpath = classpath + files(dgmConverter.outputDir)
@@ -395,6 +396,7 @@ allprojects {
     tasks.withType(GroovyCompile) {
         groovyOptions.fork(memoryMaximumSize: groovycMain_mx)
         groovyOptions.encoding = 'UTF-8'
+//        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
         groovyClasspath = files(
                 rootProject.compileJava.classpath,
                 files(project==rootProject?rootProject.bootstrapJar:rootProject.jar)