Replace string arguments with char
Optimize method calls by replacing single character String arguments with char. Closes gh-11680
This commit is contained in:
committed by
Phillip Webb
parent
2735f57b0d
commit
b19dcb13e2
@@ -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:")) {
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user