Ignore:
Timestamp:
2016-12-13T02:16:07+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S1066 - Collapsible "if" statements should be merged

File:
1 edited

Legend:

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

    r11288 r11386  
    339339            while (entries.hasMoreElements()) {
    340340                ZipEntry entry = entries.nextElement();
    341                 if (entry.getName().endsWith('.' + extension)) {
    342                     /* choose any file with correct extension. When more than
    343                         one file, prefer the one which matches namepart */
    344                     if (resentry == null || entry.getName().indexOf(namepart) >= 0) {
    345                         resentry = entry;
    346                     }
     341                // choose any file with correct extension. When more than one file, prefer the one which matches namepart
     342                if (entry.getName().endsWith('.' + extension) && (resentry == null || entry.getName().indexOf(namepart) >= 0)) {
     343                    resentry = entry;
    347344                }
    348345            }
Note: See TracChangeset for help on using the changeset viewer.