diff options
author | eaftan <eaftan@google.com> | 2015-06-19 09:59:59 -0700 |
---|---|---|
committer | Colin Decker <cgdecker@google.com> | 2015-06-22 15:01:37 -0400 |
commit | ed4db0a7d4f4b0fc92d44f8eca3b18a9abb21762 (patch) | |
tree | ed0be1c36e9c8c96d65cb27759cd4e5d638ec5c4 /jimfs/src | |
parent | b02c60ef5bd131394ea0d34a70fea94d1d785c7a (diff) | |
download | jimfs-ed4db0a7d4f4b0fc92d44f8eca3b18a9abb21762.tar.gz |
Fix cases where return value of method in java.nio.file.Path is not used.
This is in preparation for turning on a static analysis check for this.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=96412671
Diffstat (limited to 'jimfs/src')
3 files changed, 5 insertions, 5 deletions
diff --git a/jimfs/src/test/java/com/google/common/jimfs/JimfsFileSystemCloseTest.java b/jimfs/src/test/java/com/google/common/jimfs/JimfsFileSystemCloseTest.java index 9276567..0ac657a 100644 --- a/jimfs/src/test/java/com/google/common/jimfs/JimfsFileSystemCloseTest.java +++ b/jimfs/src/test/java/com/google/common/jimfs/JimfsFileSystemCloseTest.java @@ -204,7 +204,7 @@ public class JimfsFileSystemCloseTest { } try { - p.toRealPath(); + p = p.toRealPath(); fail(); } catch (ClosedFileSystemException expected) { } diff --git a/jimfs/src/test/java/com/google/common/jimfs/JimfsUnixLikeFileSystemTest.java b/jimfs/src/test/java/com/google/common/jimfs/JimfsUnixLikeFileSystemTest.java index 9379208..72623bd 100644 --- a/jimfs/src/test/java/com/google/common/jimfs/JimfsUnixLikeFileSystemTest.java +++ b/jimfs/src/test/java/com/google/common/jimfs/JimfsUnixLikeFileSystemTest.java @@ -238,13 +238,13 @@ public class JimfsUnixLikeFileSystemTest extends AbstractJimfsIntegrationTest { .and().hasNameComponents("bar"); try { - path("/foo/bar").relativize(path("bar")); + Path unused = path("/foo/bar").relativize(path("bar")); fail(); } catch (IllegalArgumentException expected) { } try { - path("bar").relativize(path("/foo/bar")); + Path unused = path("bar").relativize(path("/foo/bar")); fail(); } catch (IllegalArgumentException expected) { } diff --git a/jimfs/src/test/java/com/google/common/jimfs/JimfsWindowsLikeFileSystemTest.java b/jimfs/src/test/java/com/google/common/jimfs/JimfsWindowsLikeFileSystemTest.java index df9ff93..17c7cc0 100644 --- a/jimfs/src/test/java/com/google/common/jimfs/JimfsWindowsLikeFileSystemTest.java +++ b/jimfs/src/test/java/com/google/common/jimfs/JimfsWindowsLikeFileSystemTest.java @@ -158,13 +158,13 @@ public class JimfsWindowsLikeFileSystemTest extends AbstractJimfsIntegrationTest .and().hasNameComponents("bar"); try { - path("C:\\foo\\bar").relativize(path("bar")); + Path unused = path("C:\\foo\\bar").relativize(path("bar")); fail(); } catch (IllegalArgumentException expected) { } try { - path("bar").relativize(path("C:\\foo\\bar")); + Path unused = path("bar").relativize(path("C:\\foo\\bar")); fail(); } catch (IllegalArgumentException expected) { } |