mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
synchronized
This commit is contained in:
parent
5d070662b6
commit
317c2afd3a
1 changed files with 9 additions and 6 deletions
|
@ -351,7 +351,7 @@ public final class DataElement implements IDataElement
|
|||
* @param nestedData a set of elements to add to this element
|
||||
* @param checkUnique whether to prevent duplicates from being added
|
||||
*/
|
||||
public void addNestedData(List nestedData, boolean checkUnique)
|
||||
public synchronized void addNestedData(List nestedData, boolean checkUnique)
|
||||
{
|
||||
if (nestedData != null)
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ public final class DataElement implements IDataElement
|
|||
* @param obj the element to add
|
||||
* @param checkUnique whether to prevent duplicates from being added
|
||||
*/
|
||||
public void addNestedData(DataElement obj, boolean checkUnique)
|
||||
public synchronized void addNestedData(DataElement obj, boolean checkUnique)
|
||||
{
|
||||
if (_nestedData == null)
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ public final class DataElement implements IDataElement
|
|||
{
|
||||
if (_nestedData != null)
|
||||
{
|
||||
// synchronized(_nestedData)
|
||||
synchronized(_nestedData)
|
||||
{
|
||||
_nestedData.remove(object);
|
||||
}
|
||||
|
@ -436,6 +436,8 @@ public final class DataElement implements IDataElement
|
|||
public synchronized void removeNestedData()
|
||||
{
|
||||
if (_nestedData != null)
|
||||
{
|
||||
synchronized (_nestedData)
|
||||
{
|
||||
while (_nestedData.size() > 0)
|
||||
{
|
||||
|
@ -443,6 +445,7 @@ public final class DataElement implements IDataElement
|
|||
_nestedData.remove(nestedObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_isExpanded = false;
|
||||
_isUpdated = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue