Skip to content

Commit 81f68ed

Browse files
committed
Merge pull request #111 from childsb/npe_nojt
Fix for an exception when a non glusterfs URI is passed into the sameVolume code which has no scheme
2 parents 5550548 + 1b59fe1 commit 81f68ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/apache/hadoop/fs/glusterfs/GlusterVolume.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,9 @@ protected URI canonicalizeUri(URI uri) {
9595
public boolean sameVolume(Path p){
9696
URI thisUri = this.NAME;
9797
URI thatUri = p.toUri();
98-
if(!thatUri.getScheme().equalsIgnoreCase(thisUri.getScheme())) return false;
99-
if((thatUri.getAuthority()==null && thisUri.getAuthority()==null)) return true;
98+
if(!thisUri.getScheme().equalsIgnoreCase(thatUri.getScheme())) return false;
99+
if((thisUri.getAuthority()==null && thatUri.getAuthority()==null)) return true;
100100
return (thatUri.getAuthority()!=null && thatUri.getAuthority().equalsIgnoreCase(thisUri.getAuthority()));
101-
102101
}
103102

104103
public void setConf(Configuration conf){

0 commit comments

Comments
 (0)