Ignore:
Timestamp:
2014-05-09T06:03:50+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - replace Utils.equal by Objects.equals, new in Java 7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java

    r6711 r7083  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.gui.mappaint;
    3 
    4 import static org.openstreetmap.josm.tools.Utils.equal;
    53
    64import java.awt.Image;
    75import java.awt.Rectangle;
    86import java.awt.image.BufferedImage;
     7import java.util.Objects;
    98
    109import javax.swing.ImageIcon;
     
    1918
    2019public class MapImage {
    21    
     20
    2221    private static final int MAX_SIZE = 48;
    23    
     22
    2423    /**
    2524     * ImageIcon can change while the image is loading.
     
    158157        return new MapImageBoxProvider();
    159158    }
    160    
     159
    161160    /**
    162161     * Returns the really displayed node icon for this {@code MapImage}.
     
    174173        }
    175174    }
    176    
     175
    177176    private boolean mustRescale(Image image) {
    178         return ((width  == -1 && image.getWidth(null) > MAX_SIZE) 
     177        return ((width  == -1 && image.getWidth(null) > MAX_SIZE)
    179178             && (height == -1 && image.getHeight(null) > MAX_SIZE));
    180179    }
     
    187186        // img changes when image is fully loaded and can't be used for equality check.
    188187        return  alpha == other.alpha &&
    189                 equal(name, other.name) &&
    190                 equal(source, other.source) &&
     188                Objects.equals(name, other.name) &&
     189                Objects.equals(source, other.source) &&
    191190                width == other.width &&
    192191                height == other.height;
Note: See TracChangeset for help on using the changeset viewer.