mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed ConcurrentModificationException. Bug 293822.
This commit is contained in:
parent
1a93930f72
commit
e9a4ea6e19
1 changed files with 7 additions and 5 deletions
|
@ -219,9 +219,11 @@ public class DefaultSpellChecker implements ISpellChecker {
|
||||||
|
|
||||||
iterator.setIgnoreSingleLetters(ignoreSingleLetters);
|
iterator.setIgnoreSingleLetters(ignoreSingleLetters);
|
||||||
|
|
||||||
Iterator<ISpellDictionary> iter= fDictionaries.iterator();
|
synchronized (fDictionaries) {
|
||||||
while (iter.hasNext())
|
Iterator<ISpellDictionary> iter= fDictionaries.iterator();
|
||||||
iter.next().setStripNonLetters(ignoreNonLetters);
|
while (iter.hasNext())
|
||||||
|
iter.next().setStripNonLetters(ignoreNonLetters);
|
||||||
|
}
|
||||||
|
|
||||||
String word= null;
|
String word= null;
|
||||||
boolean starts= false;
|
boolean starts= false;
|
||||||
|
@ -233,12 +235,12 @@ public class DefaultSpellChecker implements ISpellChecker {
|
||||||
if (!fIgnored.contains(word)) {
|
if (!fIgnored.contains(word)) {
|
||||||
starts= iterator.startsSentence();
|
starts= iterator.startsSentence();
|
||||||
if (!isCorrect(word)) {
|
if (!isCorrect(word)) {
|
||||||
boolean isMixed= isMixedCase(word, true);
|
boolean isMixed= isMixedCase(word, true);
|
||||||
boolean isUpper= isUpperCase(word);
|
boolean isUpper= isUpperCase(word);
|
||||||
boolean isDigits= isDigits(word);
|
boolean isDigits= isDigits(word);
|
||||||
boolean isUrl= isUrl(word);
|
boolean isUrl= isUrl(word);
|
||||||
|
|
||||||
if ( !ignoreMixed && isMixed || !ignoreUpper && isUpper || !ignoreDigits && isDigits || !ignoreUrls && isUrl || !(isMixed || isUpper || isDigits || isUrl))
|
if (!ignoreMixed && isMixed || !ignoreUpper && isUpper || !ignoreDigits && isDigits || !ignoreUrls && isUrl || !(isMixed || isUpper || isDigits || isUrl))
|
||||||
fireEvent(new SpellEvent(this, word, iterator.getBegin(), iterator.getEnd(), starts, false));
|
fireEvent(new SpellEvent(this, word, iterator.getBegin(), iterator.getEnd(), starts, false));
|
||||||
} else {
|
} else {
|
||||||
if (!ignoreSentence && starts && Character.isLowerCase(word.charAt(0)))
|
if (!ignoreSentence && starts && Character.isLowerCase(word.charAt(0)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue