Changeset 12829 in josm


Ignore:
Timestamp:
2017-09-12T17:04:17+02:00 (2 weeks ago)
Author:
Don-vip
Message:

fix #15294 - Java 9: CCE: QuadStateCheckBox$QuadStateDecorator cannot be cast to JToggleButton$ToggleButtonModel

File:
1 edited

Legend:

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

    r12445 r12829  
    129129    }
    130130
    131     private final class QuadStateDecorator implements ButtonModel {
     131    /**
     132     * Button model for the {@code QuadStateCheckBox}.
     133     * It previously only implemented (and still could) the {@code ButtonModel} interface.
     134     * But because of JDK-8182577 (Java 9 regression) it now extends {@code ToggleButtonModel} as a workaround.
     135     * The previous implementation can be restored after Java 10 migration.
     136     * See also https://bugs.openjdk.java.net/browse/JDK-8182695
     137     */
     138    private final class QuadStateDecorator extends ToggleButtonModel {
    132139        private final ButtonModel other;
    133140        private String propertyText;
Note: See TracChangeset for help on using the changeset viewer.