Replace string arguments with char

Optimize method calls by replacing single character String arguments
with char.

Closes gh-11680
This commit is contained in:
andrey.onufreyko
2018-01-18 23:33:56 +03:00
committed by Phillip Webb
parent 2735f57b0d
commit b19dcb13e2
19 changed files with 24 additions and 24 deletions

View File

@@ -498,7 +498,7 @@ public class PropertiesLauncher extends Launcher {
// If home dir is same as parent archive, no need to add it twice.
return null;
}
int index = root.indexOf("!");
int index = root.indexOf('!');
if (index != -1) {
File file = new File(this.home, root.substring(0, index));
if (root.startsWith("jar:file:")) {

View File

@@ -112,8 +112,8 @@ public class JarFileArchive implements Archive {
private Archive getUnpackedNestedArchive(JarEntry jarEntry) throws IOException {
String name = jarEntry.getName();
if (name.lastIndexOf("/") != -1) {
name = name.substring(name.lastIndexOf("/") + 1);
if (name.lastIndexOf('/') != -1) {
name = name.substring(name.lastIndexOf('/') + 1);
}
File file = new File(getTempUnpackFolder(), name);
if (!file.exists() || file.length() != jarEntry.getSize()) {