summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorHector Caballero <hector.caballero@ericsson.com>2018-01-29 20:24:23 -0500
committerHector Caballero <hector.caballero@ericsson.com>2018-02-06 06:28:10 -0500
commit54053389ef841d1de2a19b7de173f07123cc1fb1 (patch)
treebcb3b5567cfd25fa5269ae7714fe95a8f80758bd /org.eclipse.jgit
parente00a12f5a2c6113c6dcf15fd19addb3d053ccfc2 (diff)
downloadjgit-54053389ef841d1de2a19b7de173f07123cc1fb1.tar.gz
jgit-54053389ef841d1de2a19b7de173f07123cc1fb1.zip
GC: Simplify lambda
filter() stream operation also accepts a lambda expression. Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com> Change-Id: Ie0b7fe43d39593172969fd16c3e44b49bac27306
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 2be38b980e..75b0f0b25b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -931,11 +931,10 @@ public class GC {
List<String> fileNames = null;
try (Stream<Path> files = Files.list(packDir)) {
fileNames = files.map(path -> path.getFileName().toString())
- .filter(name -> {
- return (name.endsWith(PACK_EXT)
- || name.endsWith(BITMAP_EXT)
- || name.endsWith(INDEX_EXT));
- }).sorted(Collections.reverseOrder())
+ .filter(name -> (name.endsWith(PACK_EXT)
+ || name.endsWith(BITMAP_EXT)
+ || name.endsWith(INDEX_EXT)))
+ .sorted(Collections.reverseOrder())
.collect(Collectors.toList());
} catch (IOException e1) {
// ignore