Skip to content

Commit e68b9e8

Browse files
dreis2211snicoll
authored andcommitted
Remove unnecessary parameters for String.substring
Closes gh-14661
1 parent 7087f90 commit e68b9e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ private List<Archive> getNestedArchives(String path) throws Exception {
521521
file = new File(root.substring("jar:file:".length(), index));
522522
}
523523
parent = new JarFileArchive(file);
524-
root = root.substring(index + 1, root.length());
524+
root = root.substring(index + 1);
525525
while (root.startsWith("/")) {
526526
root = root.substring(1);
527527
}

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ private static class TestProtocolResolver implements ProtocolResolver {
10841084
@Override
10851085
public Resource resolve(String location, ResourceLoader resourceLoader) {
10861086
if (location.startsWith(PREFIX)) {
1087-
String path = location.substring(PREFIX.length(), location.length());
1087+
String path = location.substring(PREFIX.length());
10881088
return new ClassPathResource(path);
10891089
}
10901090
return null;

0 commit comments

Comments
 (0)