Ignore:
Timestamp:
2017-04-13T01:08:58+02:00 (7 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/data/validation/routines/UrlValidator.java

    r11889 r11893  
    373373        }
    374374
    375         if (isOff(ALLOW_ALL_SCHEMES) && !allowedSchemes.contains(scheme.toLowerCase(Locale.ENGLISH))) {
    376             return false;
    377         }
    378 
    379         return true;
     375        return isOn(ALLOW_ALL_SCHEMES) || allowedSchemes.contains(scheme.toLowerCase(Locale.ENGLISH));
    380376    }
    381377
     
    458454        }
    459455
    460         int slash2Count = countToken("//", path);
    461         if (slash2Count > 0 && isOff(ALLOW_2_SLASHES)) {
    462             return false;
    463         }
    464 
    465         return true;
     456        return isOn(ALLOW_2_SLASHES) || countToken("//", path) <= 0;
    466457    }
    467458
Note: See TracChangeset for help on using the changeset viewer.