Ignore:
Timestamp:
2017-04-13T01:08:58+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - squid:S1126 - Return of boolean expressions should not be wrapped into an "if-then-else" statement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/LayerNameAndFilePathTableCell.java

    r10873 r11893  
    124124
    125125    private static boolean canWrite(File f) {
    126         if (f == null) return false;
    127         if (f.isDirectory()) return false;
     126        if (f == null || f.isDirectory()) return false;
    128127        if (f.exists() && f.canWrite()) return true;
    129         if (!f.exists() && f.getParentFile() != null && f.getParentFile().canWrite())
    130             return true;
    131         return false;
     128        return !f.exists() && f.getParentFile() != null && f.getParentFile().canWrite();
    132129    }
    133130
Note: See TracChangeset for help on using the changeset viewer.