private static URI fixUri(URI uri0,Configuration cfg){
  if (uri0 == null)   return FileSystem.getDefaultUri(cfg);
  String scheme=uri0.getScheme();
  String authority=uri0.getAuthority();
  if (authority == null) {
    URI dfltUri=FileSystem.getDefaultUri(cfg);
    if (scheme == null || (scheme.equals(dfltUri.getScheme()) && dfltUri.getAuthority() != null))     return dfltUri;
  }
  return uri0;
}

private static URI fixUri ( URI uri0 , Configuration cfg ) { if ( uri0 == null ) return FileSystem . getDefaultUri ( cfg ) ; String scheme = uri0 . getScheme ( ) ; String authority = uri0 . getAuthority ( ) ; if ( authority == null ) { URI dfltUri = FileSystem . getDefaultUri ( cfg ) ; if ( scheme == null || ( scheme . equals ( dfltUri . getScheme ( ) ) && dfltUri . getAuthority ( ) != null ) ) return dfltUri ; } return uri0 ; }
takes fs uri using logic similar to that used in filesystem # get ( 1 , 2 , 3 ) .
