Commit e68b9e83 authored by dreis2211's avatar dreis2211 Committed by Stephane Nicoll

Remove unnecessary parameters for String.substring

Closes gh-14661
parent 7087f90f
...@@ -521,7 +521,7 @@ public class PropertiesLauncher extends Launcher { ...@@ -521,7 +521,7 @@ public class PropertiesLauncher extends Launcher {
file = new File(root.substring("jar:file:".length(), index)); file = new File(root.substring("jar:file:".length(), index));
} }
parent = new JarFileArchive(file); parent = new JarFileArchive(file);
root = root.substring(index + 1, root.length()); root = root.substring(index + 1);
while (root.startsWith("/")) { while (root.startsWith("/")) {
root = root.substring(1); root = root.substring(1);
} }
......
...@@ -1084,7 +1084,7 @@ public class ConfigurationPropertiesTests { ...@@ -1084,7 +1084,7 @@ public class ConfigurationPropertiesTests {
@Override @Override
public Resource resolve(String location, ResourceLoader resourceLoader) { public Resource resolve(String location, ResourceLoader resourceLoader) {
if (location.startsWith(PREFIX)) { if (location.startsWith(PREFIX)) {
String path = location.substring(PREFIX.length(), location.length()); String path = location.substring(PREFIX.length());
return new ClassPathResource(path); return new ClassPathResource(path);
} }
return null; return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment