Changeset 8633 in josm


Ignore:
Timestamp:
2015-08-01T19:58:37+02:00 (9 years ago)
Author:
Don-vip
Message:

fix some compile errors that arise with openjdk-9-b74

Location:
trunk/src/org/openstreetmap/josm
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/validation/TestError.java

    r8510 r8633  
    194194     * @param primitives the list of primitives affected by this error
    195195     */
    196     public void setPrimitives(List<OsmPrimitive> primitives) {
     196    public void setPrimitives(List<? extends OsmPrimitive> primitives) {
    197197        this.primitives = primitives;
    198198    }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java

    r8540 r8633  
    338338     * @return collection of affected primitives, onluy usable ones
    339339     */
    340     protected static FilteredCollection<OsmPrimitive> getAffectedPrimitives(TreePath path) {
     340    protected static FilteredCollection<? extends OsmPrimitive> getAffectedPrimitives(TreePath path) {
    341341        PseudoCommand c = ((CommandListMutableTreeNode) path.getLastPathComponent()).getCommand();
    342342        final OsmDataLayer currentLayer = Main.main.getEditLayer();
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java

    r8540 r8633  
    2525import javax.swing.event.TreeSelectionListener;
    2626import javax.swing.tree.DefaultMutableTreeNode;
     27import javax.swing.tree.TreeNode;
    2728import javax.swing.tree.TreePath;
    2829
     
    197198            }
    198199
    199             Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
     200            Enumeration<TreeNode> children = node.breadthFirstEnumeration();
    200201            while (children.hasMoreElements()) {
    201                 DefaultMutableTreeNode childNode = children.nextElement();
     202                DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement();
    202203                if (processedNodes.contains(childNode)) {
    203204                    continue;
     
    247248                }
    248249                if (asked == JOptionPane.YES_NO_OPTION) {
    249                     Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
     250                    Enumeration<TreeNode> children = node.breadthFirstEnumeration();
    250251                    while (children.hasMoreElements()) {
    251                         DefaultMutableTreeNode childNode = children.nextElement();
     252                        DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement();
    252253                        if (processedNodes.contains(childNode)) {
    253254                            continue;
     
    272273            }
    273274
    274             Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
     275            Enumeration<TreeNode> children = node.breadthFirstEnumeration();
    275276            while (children.hasMoreElements()) {
    276                 DefaultMutableTreeNode childNode = children.nextElement();
     277                DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement();
    277278                if (processedNodes.contains(childNode)) {
    278279                    continue;
     
    315316        for (TreePath path : selectedPaths) {
    316317            DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
    317             Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
     318            Enumeration<TreeNode> children = node.breadthFirstEnumeration();
    318319            while (children.hasMoreElements()) {
    319                 DefaultMutableTreeNode childNode = children.nextElement();
     320                DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement();
    320321                Object nodeInfo = childNode.getUserObject();
    321322                if (nodeInfo instanceof TestError) {
     
    347348        DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
    348349        if (lastSelectedNode != null && !lastSelectedNode.equals(node)) {
    349             Enumeration<DefaultMutableTreeNode> children = lastSelectedNode.breadthFirstEnumeration();
     350            Enumeration<TreeNode> children = lastSelectedNode.breadthFirstEnumeration();
    350351            while (children.hasMoreElements()) {
    351                 DefaultMutableTreeNode childNode = children.nextElement();
     352                DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement();
    352353                Object nodeInfo = childNode.getUserObject();
    353354                if (nodeInfo instanceof TestError) {
     
    362363            return hasFixes;
    363364
    364         Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
     365        Enumeration<TreeNode> children = node.breadthFirstEnumeration();
    365366        while (children.hasMoreElements()) {
    366             DefaultMutableTreeNode childNode = children.nextElement();
     367            DefaultMutableTreeNode childNode = (DefaultMutableTreeNode) children.nextElement();
    367368            Object nodeInfo = childNode.getUserObject();
    368369            if (nodeInfo instanceof TestError) {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/validator/ValidatorTreePanel.java

    r8510 r8633  
    2121import javax.swing.tree.DefaultMutableTreeNode;
    2222import javax.swing.tree.DefaultTreeModel;
     23import javax.swing.tree.TreeNode;
    2324import javax.swing.tree.TreePath;
    2425import javax.swing.tree.TreeSelectionModel;
     
    6869     * that refer to one of the primitives in the filter.
    6970     */
    70     private transient Set<OsmPrimitive> filter = null;
     71    private transient Set<? extends OsmPrimitive> filter = null;
    7172
    7273    /** a counter to check if tree has been rebuild */
     
    345346     * @return the list of primitives used for filtering
    346347     */
    347     public Set<OsmPrimitive> getFilter() {
     348    public Set<? extends OsmPrimitive> getFilter() {
    348349        return filter;
    349350    }
     
    353354     * @param filter the list of primitives used for filtering
    354355     */
    355     public void setFilter(Set<OsmPrimitive> filter) {
     356    public void setFilter(Set<? extends OsmPrimitive> filter) {
    356357        if (filter != null && filter.isEmpty()) {
    357358            this.filter = null;
     
    380381
    381382        int row = 0;
    382         Enumeration<DefaultMutableTreeNode> children = root.breadthFirstEnumeration();
     383        Enumeration<TreeNode> children = root.breadthFirstEnumeration();
    383384        while (children.hasMoreElements()) {
    384385            children.nextElement();
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java

    r8510 r8633  
    181181        }
    182182
    183         Collection<PrimitiveId> toLoad = Utils.filter(primitives, unloadedHistoryPredicate);
     183        Collection<? extends PrimitiveId> toLoad = Utils.filter(primitives, unloadedHistoryPredicate);
    184184        if (!toLoad.isEmpty()) {
    185185            HistoryLoadTask task = new HistoryLoadTask();
  • trunk/src/org/openstreetmap/josm/gui/layer/ValidatorLayer.java

    r8392 r8633  
    1111import javax.swing.Icon;
    1212import javax.swing.tree.DefaultMutableTreeNode;
     13import javax.swing.tree.TreeNode;
    1314
    1415import org.openstreetmap.josm.Main;
     
    6970        DefaultMutableTreeNode severity = (DefaultMutableTreeNode) root.getLastChild();
    7071        while (severity != null) {
    71             Enumeration<DefaultMutableTreeNode> errorMessages = severity.breadthFirstEnumeration();
     72            Enumeration<TreeNode> errorMessages = severity.breadthFirstEnumeration();
    7273            while (errorMessages.hasMoreElements()) {
    73                 Object tn = errorMessages.nextElement().getUserObject();
     74                Object tn = ((DefaultMutableTreeNode) errorMessages.nextElement()).getUserObject();
    7475                if (tn instanceof TestError) {
    7576                    paintVisitor.visit((TestError) tn);
Note: See TracChangeset for help on using the changeset viewer.