jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
692 stars 124 forks source link

NullPointerException when EntityClearAction is invoked for EntityComboBox #3646

Closed glebfox closed 2 months ago

glebfox commented 2 months ago

Environment

Jmix version: 2.3.2

Bug Description

Source: forum Caused by: #3486

Steps To Reproduce

  1. Create an entity that includes many-to-one association attribute (or add one to any entity)
  2. Replace entityPicker component with entityComboBox
  3. Make sure that entity_clear action is present
  4. Open view, set value then clear it using EntityClearAction

Current Behavior

java.lang.NullPointerException: Refreshed item can’t be null
at java.base/java.util.Objects.requireNonNull(Objects.java:259)
at com.vaadin.flow.data.provider.DataChangeEvent$DataRefreshEvent.(DataChangeEvent.java:78)
at com.vaadin.flow.data.provider.DataChangeEvent$DataRefreshEvent.(DataChangeEvent.java:60)
at com.vaadin.flow.data.provider.AbstractDataProvider.refreshItem(AbstractDataProvider.java:82)
at com.vaadin.flow.data.provider.DataProviderWrapper.refreshItem(DataProviderWrapper.java:69)
at io.jmix.flowui.component.combobox.EntityComboBox.setValueFromClient(EntityComboBox.java:97)

Expected Behavior

Value is cleared