Skip to content

Commit

Permalink
[ISSUE-3306] Fix FsPath null String (apache#3307)
Browse files Browse the repository at this point in the history
* Fix the possible NPE problems in get auth path
  • Loading branch information
aiceflower authored Sep 13, 2022
1 parent 6ea0b04 commit 1497415
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ public void setPermissionString(String permissionString) throws IOException {

public String getPath() {
if (WINDOWS && !"hdfs".equals(getFsType())) {
return uri.getAuthority() + uri.getPath();
return StringUtils.isNotBlank(uri.getAuthority())
? uri.getAuthority() + uri.getPath()
: uri.getPath();
}
return uri.getPath();
}
Expand Down

0 comments on commit 1497415

Please sign in to comment.