Merge pull request #14661 from dreis2211

* pr/14661:
  Remove unnecessary parameters for String.substring
This commit is contained in:
Stephane Nicoll
2018-10-03 09:48:35 +02:00
2 changed files with 2 additions and 2 deletions

View File

@@ -521,7 +521,7 @@ public class PropertiesLauncher extends Launcher {
file = new File(root.substring("jar:file:".length(), index));
}
parent = new JarFileArchive(file);
root = root.substring(index + 1, root.length());
root = root.substring(index + 1);
while (root.startsWith("/")) {
root = root.substring(1);
}

View File

@@ -1084,7 +1084,7 @@ public class ConfigurationPropertiesTests {
@Override
public Resource resolve(String location, ResourceLoader resourceLoader) {
if (location.startsWith(PREFIX)) {
String path = location.substring(PREFIX.length(), location.length());
String path = location.substring(PREFIX.length());
return new ClassPathResource(path);
}
return null;