]> source.dussan.org Git - jgit.git/commit
Consistently use "!isEmpty()" to detect non-empty list 83/143483/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 7 Jun 2019 03:12:44 +0000 (12:12 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Fri, 7 Jun 2019 03:12:44 +0000 (12:12 +0900)
commit00f840dcd1fc53b3face0d824af0eb9de9d19f08
treeee529c0fc77b9151107747d19506be00f75bded1
parentb5a1b770a05848983688b81b5318f6ce15ead68d
Consistently use "!isEmpty()" to detect non-empty list

Replace "size() > 0" with "!isEmpty()" where appropriate.

In the Status implementation we can drop the check; the subsequent
loop will only execute when the list is non-empty anyway.

Change-Id: I355aff551a603373e702a9d44304f087b476263c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/TransferHandler.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsFiles.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CleanCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java