Replace 'indexOf()' expression with 'contains()'

Change-Id: Ida566a24d78174690b11d758c769b1d559b7fae9
This commit is contained in:
Matt Baker
2013-12-05 21:13:38 -07:00
parent 258f57aff5
commit c7dbfed9f0
5 changed files with 6 additions and 6 deletions

View File

@@ -288,10 +288,10 @@ public final class GerritLauncher {
// match the name it was in the archive.
//
String name = ze.getName();
if (0 <= name.lastIndexOf('/')) {
if (name.contains("/")) {
name = name.substring(name.lastIndexOf('/') + 1);
}
if (0 <= name.lastIndexOf('.')) {
if (name.contains(".")) {
name = name.substring(0, name.lastIndexOf('.'));
}
if (name.isEmpty()) {