diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java index 97e1933f3e4c50..abaa6b1b9d7f08 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystem.java @@ -57,7 +57,7 @@ public DigestHashFunction getDigestFunction() { */ protected static final class NotASymlinkException extends IOException { public NotASymlinkException(Path path) { - super(path.toString()); + super(path + " is not a symlink"); } } diff --git a/src/test/java/com/google/devtools/build/lib/vfs/SymlinkAwareFileSystemTest.java b/src/test/java/com/google/devtools/build/lib/vfs/SymlinkAwareFileSystemTest.java index a7bce7bb20c8cd..c1726bad04e87e 100644 --- a/src/test/java/com/google/devtools/build/lib/vfs/SymlinkAwareFileSystemTest.java +++ b/src/test/java/com/google/devtools/build/lib/vfs/SymlinkAwareFileSystemTest.java @@ -354,7 +354,7 @@ public void testReadSymbolicLink() throws IOException { xFile.readSymbolicLink(); // not a link fail(); } catch (NotASymlinkException e) { - assertThat(e).hasMessageThat().isEqualTo(xFile.toString()); + assertThat(e).hasMessageThat().isEqualTo(xFile.toString() + " is not a symlink"); } try {