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);
   }
 }