[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-06-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=610763&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-610763
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 14/Jun/21 16:40
Start Date: 14/Jun/21 16:40
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/40565919/badge)](https://coveralls.io/builds/40565919)
   
   Coverage decreased (-0.007%) to 94.969% when pulling 
**77452dd913879a8c09d14342b1c9a05a17db39ef on xenoamess-fork:remake_indexOf** 
into **197d50434748bfb2db935266cfe740fc01a607ee on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 610763)
Time Spent: 4h 20m  (was: 4h 10m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=599339&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599339
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 19/May/21 16:48
Start Date: 19/May/21 16:48
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/39825662/badge)](https://coveralls.io/builds/39825662)
   
   Coverage decreased (-0.007%) to 94.92% when pulling 
**17f9a8b10bce27dd9279f31a72511cb7c544427b on xenoamess-fork:remake_indexOf** 
into **c893f5d3ae90d5060db044ee3d0c79f36aea9511 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 599339)
Time Spent: 4h 10m  (was: 4h)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=599327&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599327
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 19/May/21 16:14
Start Date: 19/May/21 16:14
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-844255113


   @aherbert
   fixed.
   please re-review.
   thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 599327)
Time Spent: 4h  (was: 3h 50m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=599314&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599314
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 19/May/21 15:43
Start Date: 19/May/21 15:43
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r635366397



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}
+
+
+// successful-result <= len1
+if (start > len1) {
+start = len1;
+}
+
+// if len2 == 0 return directly.
+if (len2 == 0) {
+return start;
+}
+
+// limit means the largest possible value of successful-result
+final int limit = len1 - len2;
+
+// if start > limit, then have no enough length for a search,
+//   thus cannot find a index, thus fail.
+// if len2 < 0, then it is illegal for this function.
+// if limit < 0, then it means len2 > len1, thus fail.
+if (start > limit || len2 < 0 || limit < 0) {
+return -1;
+}
+
+// notice that when we enter here, we make sure:
+// start in [0, limit]
+// limit in [0, len1-1]
+// len2 in [1, len1]
+
+// if len2 is small enough, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (len2 <= TO_STRING_LIMIT) {
+if (cs instanceof String) {
+return ((String) cs).indexOf(searchChar.toString(), start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf(searchChar.toString(), 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf(searchChar.toString(), 
start);
+}
+}
+
+char char0 = searchChar.charAt(0);
+
+int i = start;
+while (true) {

Review comment:
   @aherbert
   yep, you are correct.
   glad to fix it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 599314)
Time Spent: 3h 50m  (was: 3h 40m)

> implement 

[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=599313&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599313
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 19/May/21 15:42
Start Date: 19/May/21 15:42
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/39823280/badge)](https://coveralls.io/builds/39823280)
   
   Coverage decreased (-0.003%) to 94.924% when pulling 
**19463851b34a70872fcba83a180591a544d60159 on xenoamess-fork:remake_indexOf** 
into **c893f5d3ae90d5060db044ee3d0c79f36aea9511 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 599313)
Time Spent: 3h 40m  (was: 3.5h)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=599292&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599292
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 19/May/21 14:59
Start Date: 19/May/21 14:59
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r635326740



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}
+
+
+// successful-result <= len1
+if (start > len1) {
+start = len1;
+}
+
+// if len2 == 0 return directly.
+if (len2 == 0) {
+return start;
+}
+
+// limit means the largest possible value of successful-result
+final int limit = len1 - len2;
+
+// if start > limit, then have no enough length for a search,
+//   thus cannot find a index, thus fail.
+// if len2 < 0, then it is illegal for this function.
+// if limit < 0, then it means len2 > len1, thus fail.
+if (start > limit || len2 < 0 || limit < 0) {
+return -1;
+}
+
+// notice that when we enter here, we make sure:
+// start in [0, limit]
+// limit in [0, len1-1]
+// len2 in [1, len1]
+
+// if len2 is small enough, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (len2 <= TO_STRING_LIMIT) {
+if (cs instanceof String) {
+return ((String) cs).indexOf(searchChar.toString(), start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf(searchChar.toString(), 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf(searchChar.toString(), 
start);
+}
+}
+
+char char0 = searchChar.charAt(0);
+
+int i = start;
+while (true) {

Review comment:
   > If you think your way is faster then that remains to be proven.
   
   OK, I will write&run a jmh now.
   If it shows you be correct, then I'm glad to change the codes.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Tim

[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=599291&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599291
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 19/May/21 14:57
Start Date: 19/May/21 14:57
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r635324914



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}

Review comment:
   > If `len1` is negative and if `len2` is zero then your return value 
will be whatever `len1` was, which is an incorrect result when it is not `-1`.
   
   @aherbert 
   you are correct. 
   this is a bug.
   will fix it.
   thanks.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 599291)
Time Spent: 3h 20m  (was: 3h 10m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598825&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598825
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/May/21 20:29
Start Date: 18/May/21 20:29
Worklog Time Spent: 10m 
  Work Description: aherbert commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r634721471



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}
+
+
+// successful-result <= len1
+if (start > len1) {
+start = len1;
+}
+
+// if len2 == 0 return directly.
+if (len2 == 0) {
+return start;
+}
+
+// limit means the largest possible value of successful-result
+final int limit = len1 - len2;
+
+// if start > limit, then have no enough length for a search,
+//   thus cannot find a index, thus fail.
+// if len2 < 0, then it is illegal for this function.
+// if limit < 0, then it means len2 > len1, thus fail.
+if (start > limit || len2 < 0 || limit < 0) {
+return -1;
+}
+
+// notice that when we enter here, we make sure:
+// start in [0, limit]
+// limit in [0, len1-1]
+// len2 in [1, len1]
+
+// if len2 is small enough, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (len2 <= TO_STRING_LIMIT) {
+if (cs instanceof String) {
+return ((String) cs).indexOf(searchChar.toString(), start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf(searchChar.toString(), 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf(searchChar.toString(), 
start);
+}
+}
+
+char char0 = searchChar.charAt(0);
+
+int i = start;
+while (true) {

Review comment:
   Note that the `&&` condition is only evaluated on the right if the left 
is true thus you effectively have:
   ```java
   for (int i = start; i <= limit; i++) {
   if (cs.charAt(i) == char0) {
   // ... more checks
   }
   }
   ```
   
   My suggestion was for code clarity:
   ```
   for i in [start, end]
if match at position i
 return i
   
   return -1
   ```
   It is simpler. If you think your way is 

[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598761&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598761
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/May/21 18:40
Start Date: 18/May/21 18:40
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-843436261


   > Would you, please, be so kind to rebase again? Sorry for that 
inconvenience.
   
   @jochenw rebase done.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 598761)
Time Spent: 2h 50m  (was: 2h 40m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598762&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598762
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/May/21 18:40
Start Date: 18/May/21 18:40
Worklog Time Spent: 10m 
  Work Description: XenoAmess edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-843398301


   > Hm, why do we want something so much more complicated?
   
   @garydgregory mostly for performance reason


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 598762)
Time Spent: 3h  (was: 2h 50m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598753&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598753
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/May/21 18:28
Start Date: 18/May/21 18:28
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r634646964



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}

Review comment:
   @aherbert 
   ```
   /**
* Returns the length of this character sequence.  The length is the 
number
* of 16-bit chars in the sequence.
*
* @return  the number of chars in this sequence
*/
   int length();
   ```
   
   well I'm not quite sure if there be some people implement the CharSequence 
interface with length() method return value < 0
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 598753)
Time Spent: 2h 40m  (was: 2.5h)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598734&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598734
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/May/21 17:50
Start Date: 18/May/21 17:50
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r634620022



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}
+
+
+// successful-result <= len1
+if (start > len1) {
+start = len1;
+}
+
+// if len2 == 0 return directly.
+if (len2 == 0) {
+return start;
+}
+
+// limit means the largest possible value of successful-result
+final int limit = len1 - len2;
+
+// if start > limit, then have no enough length for a search,
+//   thus cannot find a index, thus fail.
+// if len2 < 0, then it is illegal for this function.
+// if limit < 0, then it means len2 > len1, thus fail.
+if (start > limit || len2 < 0 || limit < 0) {
+return -1;
+}
+
+// notice that when we enter here, we make sure:
+// start in [0, limit]
+// limit in [0, len1-1]
+// len2 in [1, len1]
+
+// if len2 is small enough, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (len2 <= TO_STRING_LIMIT) {
+if (cs instanceof String) {
+return ((String) cs).indexOf(searchChar.toString(), start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf(searchChar.toString(), 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf(searchChar.toString(), 
start);
+}
+}
+
+char char0 = searchChar.charAt(0);
+
+int i = start;
+while (true) {

Review comment:
   @aherbert 
   I do think it will run faster the way I wrote it...
   However you can prove me wrong, means your version be faster, or equal speed 
in jmh, with most cases, then I'm glad to refine it.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
u

[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598730&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598730
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/May/21 17:46
Start Date: 18/May/21 17:46
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-843398301


   > Hm, why do we want something so much more complicated?
   
   mostly for performance reason


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 598730)
Time Spent: 2h 20m  (was: 2h 10m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=598109&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598109
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 17/May/21 18:33
Start Date: 17/May/21 18:33
Worklog Time Spent: 10m 
  Work Description: aherbert commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r633049410



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}
+
+
+// successful-result <= len1
+if (start > len1) {
+start = len1;
+}
+
+// if len2 == 0 return directly.
+if (len2 == 0) {
+return start;
+}
+
+// limit means the largest possible value of successful-result
+final int limit = len1 - len2;
+
+// if start > limit, then have no enough length for a search,
+//   thus cannot find a index, thus fail.
+// if len2 < 0, then it is illegal for this function.
+// if limit < 0, then it means len2 > len1, thus fail.
+if (start > limit || len2 < 0 || limit < 0) {
+return -1;
+}
+
+// notice that when we enter here, we make sure:
+// start in [0, limit]
+// limit in [0, len1-1]
+// len2 in [1, len1]
+
+// if len2 is small enough, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (len2 <= TO_STRING_LIMIT) {
+if (cs instanceof String) {
+return ((String) cs).indexOf(searchChar.toString(), start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf(searchChar.toString(), 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf(searchChar.toString(), 
start);
+}
+}
+
+char char0 = searchChar.charAt(0);
+
+int i = start;
+while (true) {

Review comment:
   No need for the ugly double while loop:
   ```java
   for (int i = start; i <= limit; i++) {
   if (cs.charAt(i) == char0 && checkLaterThan1(cs, searchChar, len2, i)) {
   return i;
   }
   }
   return -1;
   ```

##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param sta

[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=597859&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597859
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 17/May/21 18:04
Start Date: 17/May/21 18:04
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-841730320


   Hm, why do we want something so much more complicated? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597859)
Time Spent: 2h  (was: 1h 50m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=597823&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597823
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 17/May/21 17:59
Start Date: 17/May/21 17:59
Worklog Time Spent: 10m 
  Work Description: jochenw commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-841724647


   Would you, please, be so kind to rebase again? Sorry for that inconvenience.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597823)
Time Spent: 1h 50m  (was: 1h 40m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=597393&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597393
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 16/May/21 15:35
Start Date: 16/May/21 15:35
Worklog Time Spent: 10m 
  Work Description: aherbert commented on a change in pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#discussion_r633049410



##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param start the start index
  * @return the index where the search sequence was found
  */
-static int indexOf(final CharSequence cs, final CharSequence searchChar, 
final int start) {
-if (cs instanceof String) {
-return ((String) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuilder) {
-return ((StringBuilder) cs).indexOf(searchChar.toString(), start);
-} else if (cs instanceof StringBuffer) {
-return ((StringBuffer) cs).indexOf(searchChar.toString(), start);
-}
-return cs.toString().indexOf(searchChar.toString(), start);
-//if (cs instanceof String && searchChar instanceof String) {
-//// TODO: Do we assume searchChar is usually relatively small;
-////   If so then calling toString() on it is better than 
reverting to
-////   the green implementation in the else block
-//return ((String) cs).indexOf((String) searchChar, start);
-//} else {
-//// TODO: Implement rather than convert to String
-//return cs.toString().indexOf(searchChar.toString(), start);
-//}
+static int indexOf(final CharSequence cs, final CharSequence searchChar, 
int start) {
+// if searchChar is a String, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (searchChar instanceof String) {
+if (cs instanceof String) {
+return ((String) cs).indexOf((String) searchChar, start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf((String) searchChar, 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf((String) searchChar, start);
+}
+}
+
+int len1 = cs.length();
+int len2 = searchChar.length();
+
+// successful-result >= 0
+if (start < 0) {
+start = 0;
+}
+
+
+// successful-result <= len1
+if (start > len1) {
+start = len1;
+}
+
+// if len2 == 0 return directly.
+if (len2 == 0) {
+return start;
+}
+
+// limit means the largest possible value of successful-result
+final int limit = len1 - len2;
+
+// if start > limit, then have no enough length for a search,
+//   thus cannot find a index, thus fail.
+// if len2 < 0, then it is illegal for this function.
+// if limit < 0, then it means len2 > len1, thus fail.
+if (start > limit || len2 < 0 || limit < 0) {
+return -1;
+}
+
+// notice that when we enter here, we make sure:
+// start in [0, limit]
+// limit in [0, len1-1]
+// len2 in [1, len1]
+
+// if len2 is small enough, and cs is some specific kind of 
AbstractString,
+//   which both have a indexOf function and widely used by normal java 
codes,
+// then we just invoke their indexOf function.
+if (len2 <= TO_STRING_LIMIT) {
+if (cs instanceof String) {
+return ((String) cs).indexOf(searchChar.toString(), start);
+} else if (cs instanceof StringBuilder) {
+return ((StringBuilder) cs).indexOf(searchChar.toString(), 
start);
+} else if (cs instanceof StringBuffer) {
+return ((StringBuffer) cs).indexOf(searchChar.toString(), 
start);
+}
+}
+
+char char0 = searchChar.charAt(0);
+
+int i = start;
+while (true) {

Review comment:
   No need for the ugly double while loop:
   ```java
   for (int i = start; i <= limit; i++) {
   if (cs.charAt(i) == char0 && checkLaterThan1(cs, searchChar, len2, i)) {
   return i;
   }
   }
   return -1;
   ```

##
File path: src/main/java/org/apache/commons/lang3/CharSequenceUtils.java
##
@@ -133,24 +133,87 @@ static int indexOf(final CharSequence cs, final int 
searchChar, int start) {
  * @param sta

[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=597304&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597304
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 15/May/21 21:49
Start Date: 15/May/21 21:49
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-841730320


   Hm, why do we want something so much more complicated? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597304)
Time Spent: 1.5h  (was: 1h 20m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-05-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=597291&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-597291
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 15/May/21 21:00
Start Date: 15/May/21 21:00
Worklog Time Spent: 10m 
  Work Description: jochenw commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-841724647


   Would you, please, be so kind to rebase again? Sorry for that inconvenience.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 597291)
Time Spent: 1h 20m  (was: 1h 10m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=555466&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-555466
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 21/Feb/21 16:58
Start Date: 21/Feb/21 16:58
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/37305339/badge)](https://coveralls.io/builds/37305339)
   
   Coverage decreased (-0.003%) to 94.954% when pulling 
**7114156a019cc88326370bcb024f7f91c93eca6c on xenoamess-fork:remake_indexOf** 
into **5f8c0167071d8f7e287739fc302aa663f0b657f1 on apache:master**.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 555466)
Time Spent: 1h 10m  (was: 1h)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2021-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=555463&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-555463
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 21/Feb/21 16:49
Start Date: 21/Feb/21 16:49
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-782887411


   @garydgregory rebased. please find some time to review. thanks.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 555463)
Time Spent: 1h  (was: 50m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2020-12-06 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=520812&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-520812
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 06/Dec/20 19:15
Start Date: 06/Dec/20 19:15
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/35483008/badge)](https://coveralls.io/builds/35483008)
   
   Coverage decreased (-0.003%) to 95.013% when pulling 
**165534dbc9b52324b4357b46c0dbda43e0994ea7 on xenoamess-fork:remake_indexOf** 
into **041cf552c59a939aa54e9f8708384f0adc19dbf3 on apache:master**.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 520812)
Time Spent: 50m  (was: 40m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2020-12-06 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=520809&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-520809
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 06/Dec/20 19:08
Start Date: 06/Dec/20 19:08
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/35482943/badge)](https://coveralls.io/builds/35482943)
   
   Coverage decreased (-0.003%) to 95.013% when pulling 
**b6ea977cf03c307bc17d9ed04508e4e3e9605a16 on xenoamess-fork:remake_indexOf** 
into **041cf552c59a939aa54e9f8708384f0adc19dbf3 on apache:master**.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 520809)
Time Spent: 40m  (was: 0.5h)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2020-12-06 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=520807&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-520807
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 06/Dec/20 19:04
Start Date: 06/Dec/20 19:04
Worklog Time Spent: 10m 
  Work Description: XenoAmess commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-739547643


   @arturobernalg Got it. I got a really busy job recently, sorry for the late 
reply.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 520807)
Time Spent: 0.5h  (was: 20m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2020-11-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=513364&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-513364
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 18/Nov/20 05:57
Start Date: 18/Nov/20 05:57
Worklog Time Spent: 10m 
  Work Description: arturobernalg commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-729448266


   Hi @XenoAmess 
   
   Rebase with master
   
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 513364)
Time Spent: 20m  (was: 10m)

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1572) implement TODO in CharSequenceUtils.indexOf : remake it.

2020-06-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1572?focusedWorklogId=451840&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-451840
 ]

ASF GitHub Bot logged work on LANG-1572:


Author: ASF GitHub Bot
Created on: 27/Jun/20 03:49
Start Date: 27/Jun/20 03:49
Worklog Time Spent: 10m 
  Work Description: coveralls commented on pull request #560:
URL: https://github.com/apache/commons-lang/pull/560#issuecomment-650483751


   
   [![Coverage 
Status](https://coveralls.io/builds/31720343/badge)](https://coveralls.io/builds/31720343)
   
   Coverage decreased (-0.003%) to 94.672% when pulling 
**7335badbc7e4654da6ef1487619a81346310c26c on XenoAmess:remake_indexOf** into 
**1621a23d2bd99df845abae0beea0add84135a49d on apache:master**.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 451840)
Remaining Estimate: 0h
Time Spent: 10m

> implement TODO in CharSequenceUtils.indexOf : remake it.
> 
>
> Key: LANG-1572
> URL: https://issues.apache.org/jira/browse/LANG-1572
> Project: Commons Lang
>  Issue Type: Sub-task
>Reporter: Jin Xu
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> [https://github.com/apache/commons-lang/pull/560]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)