Ignore:
Timestamp:
2015-09-21T23:48:29+02:00 (9 years ago)
Author:
Don-vip
Message:

Basic Java 9 support: make code compile, and Linux scripts detect it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r8510 r8777  
    108108            E oldPrototype = getPrototypeDisplayValue();
    109109            // Get internal JList to directly call the renderer
    110             JList<E> list = getList();
     110            @SuppressWarnings("rawtypes")
     111            JList list = getList();
    111112            try {
    112113                // Index to give to renderer
     
    117118                        // but not with TaggingPreset custom renderer that return a dummy height if index is equal to -1
    118119                        // So we explicitely call the renderer by simulating a correct index for the current value
     120                        @SuppressWarnings("unchecked")
    119121                        Component c = getRenderer().getListCellRendererComponent(list, value, i, true, true);
    120122                        if (c != null) {
     
    139141
    140142    @SuppressWarnings("unchecked")
    141     protected final JList<E> getList() {
     143    protected final JList<Object> getList() {
    142144        for (int i = 0; i < getUI().getAccessibleChildrenCount(this); i++) {
    143145            Accessible child = getUI().getAccessibleChild(this, i);
     
    158160            // If possible, adjust the maximum number of items with the real height of items
    159161            // It is not granted this works on every platform (tested OK on Windows)
    160             JList<E> list = getList();
     162            JList<Object> list = getList();
    161163            if (list != null) {
    162164                if (!prototype.equals(list.getPrototypeCellValue())) {
Note: See TracChangeset for help on using the changeset viewer.