use index of char instead of index of string, if possible

This commit is contained in:
Sebastian Sdorra
2013-01-30 10:10:20 +01:00
parent d165baffe9
commit 2d5fa22ca4
16 changed files with 17 additions and 17 deletions

View File

@@ -299,7 +299,7 @@ public class DefaultPluginLoader implements PluginLoader
{
// jar:file:/some/path/file.jar!/META-INF/scm/plugin.xml
path = path.substring("jar:file:".length(), path.lastIndexOf("!"));
path = path.substring("jar:file:".length(), path.lastIndexOf('!'));
path = decodePath(path);
}

View File

@@ -673,7 +673,7 @@ public class DefaultPluginManager
*/
private String getPluginIdPrefix(String pluginId)
{
return pluginId.substring(0, pluginId.lastIndexOf(":"));
return pluginId.substring(0, pluginId.lastIndexOf(':'));
}
/**