Skip to content

Conversation

@jkadams
Copy link
Contributor

@jkadams jkadams commented Oct 6, 2015

See bug 24605755.

@jkadams
Copy link
Contributor Author

jkadams commented Oct 21, 2015

In that case, start and end both return -1:
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html#start(int)
"or -1 if the match was successful but the group itself did not match anything"

Tested with java.util.regex.Matcher, and start/end both return -1 and group returns null, so this is fine the way it is - the only bug is in appendReplacement.

alandonovan pushed a commit that referenced this pull request Oct 21, 2015
Stop appendReplacement from throwing an exception when a replacement group is null.
@alandonovan alandonovan merged commit da74886 into google:master Oct 21, 2015
@alandonovan
Copy link
Contributor

Thanks for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants