Forum Discussion

DenisMedvedev's avatar
DenisMedvedev
Contributor
10 years ago
Solved

How to deal with ConcurrentModificationException exception?

I’m getting this error, when I’m working with dropdown in table.

 

 

 

I’m using bellow code:

this.SetDropDownValueByRowNamberAndColumnName = function(rowNumber, columnName, dropDownValue){
    WaitObject(obj,Project.Variables.timeOut);
    obj.ClickCell(rowNumber, columnName);
    aqUtils.Delay(2000);
    Aliases.bla-bla.DropDownItem.ClickItem(dropDownValue);  
  }

At first I thought that I need increase Delay(it was 100 ms), but no it does not work. Also I was trying to record the script and got the same error.

So what can cause this error?

 

P.S. Sometimes it works fine.

 

I would be grateful for any help.

Thanks in advance

Denis

 

Error code:

Exception in thread "AWT-EventQueue-2" java.util.ConcurrentModificationException
	at java.util.HashMap$Ha**bleep**erator.nextNode(Unknown Source)
	at java.util.HashMap$KeyIterator.next(Unknown Source)
	at com.intransit.dbs.swing.mvtable.DefaultMVEditor.fireCellEditingStopped(DefaultMVEditor.java:664)
	at com.intransit.dbs.swing.mvtable.DefaultMVEditor.stopCellEditing(DefaultMVEditor.java:578)
	at com.intransit.dbs.swing.DBSMVTable.stopCellEditing(DBSMVTable.java:1508)
	at com.intransit.dbs.swing.DBSMVTable$CellEditorFocusListener.focusLost(DBSMVTable.java:2019)
	at java.awt.AWTEventMulticaster.focusLost(Unknown Source)
	at java.awt.Component.processFocusEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)