Modify ↓
Opened 4 years ago
Closed 3 years ago
#21420 closed defect (fixed)
[Patch] JosmComboBox refactoring causes Coverity warning: Type mismatch between JList<Object> and JList<E>
Reported by: | Don-vip | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 21.10 |
Component: | Core | Version: | |
Keywords: | regression coverity | Cc: | marcello@… |
Description
Since #21319 / r18221, the following code in JosmComboBox causes a warning in coverity:
@SuppressWarnings("unchecked") public JList<E> getList() { Object popup = getUI().getAccessibleChild(this, 0); if (popup != null && popup instanceof javax.swing.plaf.basic.ComboPopup) { return ((javax.swing.plaf.basic.ComboPopup) popup).getList(); } return null; }
Using Eclipse FE [WARNING] Internal compilation issue: src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java 304:20 Type mismatch: cannot convert from JList<Object> to JList<E> [WARNING] Native compilation failure [WARNING] Body of method 'org.openstreetmap.josm.gui.widgets.JosmComboBox.getList()' discarded due to error recovery. Compilation successful!
@marcello: Do you see a way to avoid that?
Attachments (1)
Change History (4)
comment:1 by , 4 years ago
Milestone: | 21.09 → 21.10 |
---|
comment:2 by , 4 years ago
Summary: | JosmComboBox refactoring causes Coverity warning: Type mismatch between JList<Object> and JList<E> → [Patch] JosmComboBox refactoring causes Coverity warning: Type mismatch between JList<Object> and JList<E> |
---|
Note:
See TracTickets
for help on using tickets.
Milestone renamed