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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jxpath.git


The following commit(s) were added to refs/heads/master by this push:
     new 135c863  Use Java 5's String#contains(CharSequence)
     new ff11472  Merge branch 'master' of 
https://gitbox.apache.org/repos/asf/commons-jxpath.git
135c863 is described below

commit 135c863bf74c1568cd9a0bffb6d444c946500d1f
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Mar 22 09:44:59 2024 -0400

    Use Java 5's String#contains(CharSequence)
---
 src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java 
b/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
index 92cff48..89070f0 100644
--- a/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
+++ b/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
@@ -570,7 +570,7 @@ public class CoreFunction extends Operation {
         assertArgCount(2);
         final String s1 = 
InfoSetUtil.stringValue(getArg1().computeValue(context));
         final String s2 = 
InfoSetUtil.stringValue(getArg2().computeValue(context));
-        return s1.indexOf(s2) != -1 ? Boolean.TRUE : Boolean.FALSE;
+        return Boolean.valueOf(s1.contains(s2));
     }
 
     /**

Reply via email to