From 6a4c77e619d79c885aa6f08f2a1d8d8c1a936bcb Mon Sep 17 00:00:00 2001 From: Carsten Hammer Date: Thu, 11 Apr 2019 19:27:34 +0200 Subject: Use isEmpty() instead of size()==0 where possible Change-Id: I97f1367a2ea9f1f6146e264c27c3981b842f2a26 Signed-off-by: Carsten Hammer Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm') diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java index d99f88e35b..4a50708b4c 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java @@ -96,7 +96,7 @@ public class PathTreeFilterHandler extends OptionHandler { filters.add(PathFilter.create(path)); } - if (filters.size() == 0) + if (filters.isEmpty()) return 0; if (filters.size() == 1) { setter.addValue(filters.get(0)); -- cgit v1.2.3