Ignore:
Timestamp:
2016-12-13T01:57:37+01:00 (9 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/data/validation/routines/UrlValidator.java

    r10693 r11385  
    314314        String authority = urlMatcher.group(PARSE_URL_AUTHORITY);
    315315        if ("file".equals(scheme)) { // Special case - file: allows an empty authority
    316             if (!"".equals(authority)) {
    317                 if (authority.contains(":")) { // but cannot allow trailing :
    318                     setErrorMessage(tr("URL contains an invalid authority: {0}", authority));
    319                     return false;
    320                 }
     316            if (!"".equals(authority) && authority.contains(":")) { // but cannot allow trailing :
     317                setErrorMessage(tr("URL contains an invalid authority: {0}", authority));
     318                return false;
    321319            }
    322320            // drop through to continue validation
Note: See TracChangeset for help on using the changeset viewer.