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 2021/09/24 22:15:24 UTC

[groovy] branch master updated: Use Boolean#parseBoolean

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


The following commit(s) were added to refs/heads/master by this push:
     new 7dfec15  Use Boolean#parseBoolean
     new 96ecbab  Merge pull request #1624 from T45K/make-consistent-with-1141
7dfec15 is described below

commit 7dfec15cdfa532ae04821a60dbc99b7fa74a9818
Author: T45K <ta...@gmail.com>
AuthorDate: Fri Sep 24 23:58:27 2021 +0900

    Use Boolean#parseBoolean
---
 src/main/java/groovy/util/Node.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/groovy/util/Node.java b/src/main/java/groovy/util/Node.java
index 88ae680..255073a 100644
--- a/src/main/java/groovy/util/Node.java
+++ b/src/main/java/groovy/util/Node.java
@@ -709,7 +709,7 @@ public class Node implements Serializable, Cloneable {
      * @since 2.5.0
      */
     public void breadthFirst(Map<String, Object> options, Closure c) {
-        boolean preorder = Boolean.valueOf(options.get("preorder").toString());
+        boolean preorder = Boolean.parseBoolean(options.get("preorder").toString());
         if (preorder) callClosureForNode(c, this, 1);
         breadthFirstRest(preorder, 2, c);
         if (!preorder) callClosureForNode(c, this, 1);