mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-04 21:59:10 +01:00
use index of char instead of index of string, if possible
This commit is contained in:
@@ -101,7 +101,7 @@ public class INIConfigurationReader extends AbstractReader<INIConfiguration>
|
||||
else if ((section != null) &&!line.startsWith(";")
|
||||
&&!line.startsWith("#"))
|
||||
{
|
||||
int index = line.indexOf("=");
|
||||
int index = line.indexOf('=');
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Proxies
|
||||
url = url.substring(index + 3);
|
||||
}
|
||||
|
||||
index = url.indexOf("/");
|
||||
index = url.indexOf('/');
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PluginVersion implements Comparable<PluginVersion>
|
||||
{
|
||||
this.unparsedVersion = versionString;
|
||||
|
||||
int index = versionString.indexOf("-");
|
||||
int index = versionString.indexOf('-');
|
||||
String versionPart = null;
|
||||
String qualifierPart = null;
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ public class Person implements Validateable, Serializable
|
||||
{
|
||||
String name = value;
|
||||
String mail = null;
|
||||
int s = value.indexOf("<");
|
||||
int e = value.indexOf(">");
|
||||
int s = value.indexOf('<');
|
||||
int e = value.indexOf('>');
|
||||
|
||||
if ((s > 0) && (e > 0))
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ public class UrlUtil
|
||||
|
||||
if (Util.isNotEmpty(revision))
|
||||
{
|
||||
int index = revision.indexOf(":");
|
||||
int index = revision.indexOf(':');
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
|
||||
@@ -331,7 +331,7 @@ public class HttpUtil
|
||||
*/
|
||||
public static String removeMatrixParameter(String uri)
|
||||
{
|
||||
int index = uri.indexOf(";");
|
||||
int index = uri.indexOf(';');
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ public class RegistryUtil
|
||||
if (value.startsWith("\""))
|
||||
{
|
||||
value = value.substring(1);
|
||||
value = value.substring(0, value.indexOf("\""));
|
||||
value = value.substring(0, value.indexOf('"'));
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
|
||||
@@ -217,7 +217,7 @@ public class CGIRunner
|
||||
// into exec here...
|
||||
String execCmd = path;
|
||||
|
||||
if ((execCmd.charAt(0) != '"') && (execCmd.indexOf(" ") >= 0))
|
||||
if ((execCmd.charAt(0) != '"') && (execCmd.indexOf(' ') >= 0))
|
||||
{
|
||||
execCmd = "\"" + execCmd + "\"";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user