jdk/src/java.base/windows/classes/sun/nio/fs/WindowsPath.java
changeset 28847 5667388e3a79
parent 28244 1b52033818b1
child 37355 5ab49ea6e03a
equal deleted inserted replaced
28846:b96683be2713 28847:5667388e3a79
   388             throw new IllegalArgumentException("'other' is different type of Path");
   388             throw new IllegalArgumentException("'other' is different type of Path");
   389 
   389 
   390         // can only relativize paths if root component matches
   390         // can only relativize paths if root component matches
   391         if (!this.root.equalsIgnoreCase(other.root))
   391         if (!this.root.equalsIgnoreCase(other.root))
   392             throw new IllegalArgumentException("'other' has different root");
   392             throw new IllegalArgumentException("'other' has different root");
       
   393 
       
   394         // this path is the empty path
       
   395         if (this.isEmpty())
       
   396             return other;
   393 
   397 
   394         int bn = this.getNameCount();
   398         int bn = this.getNameCount();
   395         int cn = other.getNameCount();
   399         int cn = other.getNameCount();
   396 
   400 
   397         // skip matching names
   401         // skip matching names