Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (11 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/GeorefImage.java

    r7425 r8510  
    3737    private int yIndex;
    3838
    39     private static final Color transparentColor = new Color(0,0,0,0);
     39    private static final Color transparentColor = new Color(0, 0, 0, 0);
    4040    private Color fadeColor = transparentColor;
    4141
     
    118118            return false;
    119119
    120         if(!(this.xIndex == xIndex && this.yIndex == yIndex))
     120        if (!(this.xIndex == xIndex && this.yIndex == yIndex))
    121121            return false;
    122122
     
    130130
    131131        // This happens if you zoom outside the world
    132         if(width == 0 || height == 0)
     132        if (width == 0 || height == 0)
    133133            return false;
    134134
     
    141141        }
    142142
    143         BufferedImage img = reImg == null?null:reImg.get();
    144         if(img != null && img.getWidth() == width && img.getHeight() == height && fadeColor.equals(newFadeColor)) {
     143        BufferedImage img = reImg == null ? null : reImg.get();
     144        if (img != null && img.getWidth() == width && img.getHeight() == height && fadeColor.equals(newFadeColor)) {
    145145            g.drawImage(img, x, y, null);
    146146            return true;
     
    152152
    153153        try {
    154             if(img != null) {
     154            if (img != null) {
    155155                img.flush();
    156156            }
     
    163163            // traditional rendering is as fast at these zoom levels, so it's no loss.
    164164            // Also prevent caching if we're out of memory soon
    165             if(width > 2000 || height > 2000 || width*height*multipl > freeMem) {
     165            if (width > 2000 || height > 2000 || width*height*multipl > freeMem) {
    166166                fallbackDraw(g, getImage(), x, y, width, height, alphaChannel);
    167167            } else {
    168168                // We haven't got a saved resized copy, so resize and cache it
    169                 img = new BufferedImage(width, height, alphaChannel?BufferedImage.TYPE_INT_ARGB:BufferedImage.TYPE_3BYTE_BGR);
     169                img = new BufferedImage(width, height, alphaChannel ? BufferedImage.TYPE_INT_ARGB : BufferedImage.TYPE_3BYTE_BGR);
    170170                img.getGraphics().drawImage(getImage(),
    171171                        0, 0, width, height, // dest
     
    179179                reImg = new SoftReference<>(img);
    180180            }
    181         } catch(Exception e) {
     181        } catch (Exception e) {
    182182            fallbackDraw(g, getImage(), x, y, width, height, alphaChannel);
    183183        }
     
    216216    private void writeObject(ObjectOutputStream out) throws IOException {
    217217        out.writeObject(state);
    218         if(getImage() == null) {
     218        if (getImage() == null) {
    219219            out.writeBoolean(false);
    220220            out.writeObject(null);
Note: See TracChangeset for help on using the changeset viewer.