commit | a080fbb183108872392e839bb783ddc0d8b94383 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <edwin.kempin@sap.com> | Wed Jun 24 20:35:47 2015 +0200 |
committer | Edwin Kempin <edwin.kempin@sap.com> | Thu Jun 25 07:30:16 2015 +0200 |
tree | 4bdd1e278fe7c1bca069d01818902e222adaf1dd | |
parent | 741c71342080c33c5644b2ec13dc7287f4b41f4e [diff] |
Simplify computation of project base name Change-Id: Ibb1d033ee1756cb24551eff6d2098e2573fc835f Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java b/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java index dfb95e6..d76615f 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java +++ b/src/main/java/com/googlesource/gerrit/plugins/download/command/CloneWithCommitMsgHook.java
@@ -53,12 +53,7 @@ .toString(); } - private String getBaseName(String project) { - int i = project.lastIndexOf('/'); - if (i < 0) { - return project; - } else { - return project.substring(i + 1); - } + private static String getBaseName(String project) { + return project.substring(project.lastIndexOf('/') + 1); } }