ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gin...@apache.org
Subject ant git commit: Merge ifs
Date Wed, 11 Apr 2018 15:48:24 GMT
Repository: ant
Updated Branches:
  refs/heads/master 066c4ce61 -> 82c2c3331


Merge ifs

Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/82c2c333
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/82c2c333
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/82c2c333

Branch: refs/heads/master
Commit: 82c2c3331228ce38f5bd1927f550ec6caa1fa7f3
Parents: 066c4ce
Author: Gintas Grigelionis <gintas@apache.org>
Authored: Wed Apr 11 17:48:09 2018 +0200
Committer: Gintas Grigelionis <gintas@apache.org>
Committed: Wed Apr 11 17:48:09 2018 +0200

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/util/ScriptRunnerBase.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/82c2c333/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
index 91aefa4..eae129d 100644
--- a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
+++ b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
@@ -92,11 +92,8 @@ public abstract class ScriptRunnerBase {
      * @param bean the object to be stored in the script context.
      */
     public void addBean(String key, Object bean) {
-        if (key.isEmpty() || !Character.isJavaIdentifierStart(key.charAt(0))) {
-            return;
-        }
-
-        if (!key.chars().skip(1).allMatch(Character::isJavaIdentifierPart)) {
+        if (key.isEmpty() || !Character.isJavaIdentifierStart(key.charAt(0))
+                || !key.chars().skip(1).allMatch(Character::isJavaIdentifierPart)) {
             return;
         }
 


Mime
View raw message