/src/main/java/org/htmlunit/html/HtmlSelect.java
if ( size < allOptions.size( ) ) {
if ( index < allOptions.size ( ) ) {
setSelectedAttribute(itemToUnSelect, false); } if (index < 0) { return; } final List<HtmlOption> allOptions = getOptions(); <extra_id_0> final HtmlOption itemToSelect = allOptions.get(index); setSelectedAttribute(itemToSelect, true, false, true, false, true); } } public void ensureSelectedIndex() { if (getOptionSize() == 0) {