aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
diff options
context:
space:
mode:
authorCarsten Hammer <carsten.hammer@t-online.de>2019-04-11 19:27:34 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-04-13 19:53:29 +0200
commit6a4c77e619d79c885aa6f08f2a1d8d8c1a936bcb (patch)
tree30c8ad7fa8a890578c07026d494cacb4a16406a7 /org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
parent6e03645ad80adf71527ca18f937db4b8e34b7f13 (diff)
downloadjgit-6a4c77e619d79c885aa6f08f2a1d8d8c1a936bcb.tar.gz
jgit-6a4c77e619d79c885aa6f08f2a1d8d8c1a936bcb.zip
Use isEmpty() instead of size()==0 where possible
Change-Id: I97f1367a2ea9f1f6146e264c27c3981b842f2a26 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index 9f071c4c4e..8671800df2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -282,7 +282,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
ru.setRefLogMessage(reflogComment, false);
} else {
String prefix = amend ? "commit (amend): " //$NON-NLS-1$
- : parents.size() == 0 ? "commit (initial): " //$NON-NLS-1$
+ : parents.isEmpty() ? "commit (initial): " //$NON-NLS-1$
: "commit: "; //$NON-NLS-1$
ru.setRefLogMessage(prefix + revCommit.getShortMessage(),
false);