Merge branch 'pr-399'

Closes #399
This commit is contained in:
Bruno P. Kinoshita 2019-08-20 22:07:34 +12:00
commit f0534ba854
2 changed files with 6 additions and 3 deletions

View File

@ -55,6 +55,7 @@ The <action> type attribute can be add,update,fix,remove.
<action issue="LANG-1470" type="add" dev="ggregory">Add ArrayUtils.addFirst() methods.</action>
<action issue="LANG-1437" type="update" dev="ggregory" due-to="Andrei Troie">Remove redundant if statements in join methods #411.</action>
<action issue="LANG-1460" type="fix" dev="kinow" due-to="Larry West">Trivial: year of release for 3.9 says 2018, should be 2019</action>
<action issue="LANG-1476" type="fix" dev="kinow" due-to="emopers">Use synchronise on a set created with Collections.synchronizedSet before iterating</action>
</release>
<release version="3.9" date="2019-04-09" description="New features and bug fixes. Requires Java 8, supports Java 9, 10, 11">

View File

@ -237,9 +237,11 @@ public class CharSet implements Serializable {
* @return {@code true} if the set contains the characters
*/
public boolean contains(final char ch) {
for (final CharRange range : set) {
if (range.contains(ch)) {
return true;
synchronized(set) {
for (final CharRange range : set) {
if (range.contains(ch)) {
return true;
}
}
}
return false;