Skip to content

Commit 67390a2

Browse files
committed
wip
1 parent 59c0fa0 commit 67390a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/mediathek/tool/swing/ComboBoxSearchable2.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ public void propertyChange(PropertyChangeEvent evt) {
145145
if ("model".equals(evt.getPropertyName())) {
146146
hidePopup();
147147

148-
if (evt.getOldValue() instanceof ComboBoxModel) {
149-
((ComboBoxModel<?>) evt.getOldValue()).removeListDataListener(this);
148+
if (evt.getOldValue() instanceof ComboBoxModel<?> model) {
149+
model.removeListDataListener(this);
150150
}
151151

152-
if (evt.getNewValue() instanceof ComboBoxModel) {
153-
((ComboBoxModel<?>) evt.getNewValue()).addListDataListener(this);
152+
if (evt.getNewValue() instanceof ComboBoxModel<?> model) {
153+
model.addListDataListener(this);
154154
}
155155
fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE));
156156
}

0 commit comments

Comments
 (0)