equal
deleted
inserted
replaced
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 |