Repository: commons-lang
Updated Branches:
  refs/heads/master ea666d523 -> 05647d46e


LANG-1281: Javadoc of StringUtils.ordinalIndexOf is contradictory (closes #205)


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/05647d46
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/05647d46
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/05647d46

Branch: refs/heads/master
Commit: 05647d46e9ac2bf674b320e8467616aa72954f3e
Parents: ea666d5
Author: pascalschumacher <[email protected]>
Authored: Fri Nov 4 17:20:56 2016 +0100
Committer: pascalschumacher <[email protected]>
Committed: Sun Nov 6 12:19:54 2016 +0100

----------------------------------------------------------------------
 src/changes/changes.xml                                 | 1 +
 src/main/java/org/apache/commons/lang3/StringUtils.java | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/05647d46/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b2a886f..955c4a2 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -46,6 +46,7 @@ The <action> type attribute can be add,update,fix,remove.
   <body>
 
   <release version="3.6" date="2016-MM-DD" description="TBD">
+    <action issue="LANG-1281" type="fix" dev="pschumacher" due-to="Andreas 
Lundblad">Javadoc of StringUtils.ordinalIndexOf is contradictory.</action>
     <action issue="LANG-1269" type="fix" dev="pschumacher">Wrong name or 
result of StringUtils#getJaroWinklerDistance</action>
     <action issue="LANG-1188" type="fix" 
dev="pschumacher">StringUtils#join(T...): warning: [unchecked] Possible heap 
pollution from parameterized vararg type T</action>
     <action issue="LANG-1144" type="fix" dev="ggregory" due-to="Waldemar 
Maier, Gary Gregory">Multiple calls of 
org.apache.commons.lang3.concurrent.LazyInitializer.initialize() are 
possible.</action>

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/05647d46/src/main/java/org/apache/commons/lang3/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java 
b/src/main/java/org/apache/commons/lang3/StringUtils.java
index 828f4c6..0d37d70 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -1394,10 +1394,10 @@ public class StringUtils {
      * <p>Finds the n-th index within a CharSequence, handling {@code null}.
      * This method uses {@link String#indexOf(String)} if possible.</p>
      * <p><b>Note:</b> The code starts looking for a match at the start of the 
target,
-     * incrementing the starting index by one after each successful match.</p>
-     * <p>The code increments the starting index by one,
-     * rather than by the length of the match string,
-     * so matches may overlap.</p>
+     * incrementing the starting index by one after each successful match
+     * (unless {@code searchStr} is an empty string in which case the position
+     * is never incremented and {@code 0} is returned immediately).
+     * This means that matches may overlap.</p>
      * <p>A {@code null} CharSequence will return {@code -1}.</p>
      *
      * <pre>

Reply via email to