diff options
author | Liam Miller-Cushon <cushon@google.com> | 2018-01-10 08:00:00 -0800 |
---|---|---|
committer | Ivan Gavrilovic <gavra@google.com> | 2018-05-04 10:36:54 +0100 |
commit | 485a7d2e293bea5cbf8e36702fe26499d22a54b7 (patch) | |
tree | 33608f8f5dcbe2231c5ecfe841296b3e75a495b6 | |
parent | 45383a982f296015a233fdb5ffa46fad9e0ae245 (diff) | |
download | desugar-485a7d2e293bea5cbf8e36702fe26499d22a54b7.tar.gz |
Fix StreamResourceLeak error
Fixes #4414
Change-Id: If47d9b97a220ae9e9feec2996be1f7df6491e93b
PiperOrigin-RevId: 181465165
GitOrigin-RevId: 65c13dd5a4c1b4b5a072f7680b8f1cf3c5079b52
-rw-r--r-- | java/com/google/devtools/build/android/desugar/LambdaClassMaker.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/java/com/google/devtools/build/android/desugar/LambdaClassMaker.java b/java/com/google/devtools/build/android/desugar/LambdaClassMaker.java index 72f039a..94c6bbc 100644 --- a/java/com/google/devtools/build/android/desugar/LambdaClassMaker.java +++ b/java/com/google/devtools/build/android/desugar/LambdaClassMaker.java @@ -81,12 +81,12 @@ class LambdaClassMaker { if (!Files.exists(rootPathPrefix.getParent())) { return ImmutableList.of(); } - try (Stream<Path> paths = - Files.list(rootPathPrefix.getParent()) - .filter( - path -> path.toString().startsWith(rootPathPrefixStr) - && !existingPaths.contains(path))) { - return paths.collect(ImmutableList.toImmutableList()); + try (Stream<Path> paths = Files.list(rootPathPrefix.getParent())) { + return paths + .filter( + path -> + path.toString().startsWith(rootPathPrefixStr) && !existingPaths.contains(path)) + .collect(ImmutableList.toImmutableList()); } } } |