EmptyPlaceHolder causes IndexOutOfBoundsException on MaterialListValueBox#getValue
See original GitHub issueSelecting the very last item in the list and then calling MaterialListValueBox#getValue causes IndexOutOfBoundsException. This is because MaterialListValueBox#setEmptyPlaceHolder adds a new item into the list but does not add a new value into the array of the underlying model.
MaterialListValueBox#setEmptyPlaceHolder:
public void setEmptyPlaceHolder(String value) {
listBox.insertItem(value, 0);
getOptionElement(0).setDisabled(true);
}
I did not think this through at all, but maybe adding a null value at the 0-index of the underlying array could work? (Unless someone will beat me to it I shall look into it during this upcoming week.)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
how to fix java.lang.IndexOutOfBoundsException
By executing this for loop , the loop will execute with a thrown exception as IndexOutOfBoundException cause, suppose list size is 10 ...
Read more >toPandas() causes IndexOutOfBoundsException in Apache ...
Using DBR 10.0. When calling toPandas() the worker fails with IndexOutOfBoundsException. It seems like ArrowWriter.
Read more >IndexOutOfBoundsException (Java Platform SE 8 )
Class IndexOutOfBoundsException Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@jzaruba Can you please add a test case for any new features to avoid regressions in the future.
@kevzlou7979 I did not consider this one a new feature, rather a bug-fix. (If you referred to #753 then ignore this comment.)