We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b5023f commit 677b97cCopy full SHA for 677b97c
src/com/magento/idea/magento2plugin/actions/generation/dialog/AbstractDialog.java
@@ -184,10 +184,10 @@ private String resolveFieldValueByComponentType(final Object field) {
184
if (field instanceof JTextField) {
185
return ((JTextField) field).isEditable() ? ((JTextField) field).getText() : null;
186
} else if (field instanceof JComboBox) {
187
- try {
188
- return ((JComboBox) field).getSelectedItem().toString();
189
- } catch (NullPointerException exception) {
+ if (((JComboBox<?>) field).getSelectedIndex() == -1) {
190
return "";
+ } else {
+ return ((JComboBox) field).getSelectedItem().toString();
191
}
192
193
return null;
0 commit comments