mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
synchronize on model to avoid concurrency problems, 2
This commit is contained in:
@@ -382,12 +382,14 @@ public class FindManagerImpl extends FindManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
FindExceptCommentsOrLiteralsData data = model.getUserData(ourExceptCommentsOrLiteralsDataKey);
|
||||
if (data == null || !data.isAcceptableFor(model, file, text)) {
|
||||
model.putUserData(ourExceptCommentsOrLiteralsDataKey, data = new FindExceptCommentsOrLiteralsData(file, model, text));
|
||||
}
|
||||
synchronized (model) {
|
||||
FindExceptCommentsOrLiteralsData data = model.getUserData(ourExceptCommentsOrLiteralsDataKey);
|
||||
if (data == null || !data.isAcceptableFor(model, file, text)) {
|
||||
model.putUserData(ourExceptCommentsOrLiteralsDataKey, data = new FindExceptCommentsOrLiteralsData(file, model, text));
|
||||
}
|
||||
|
||||
return data;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user