Skip to content

Commit 101fd14

Browse files
committed
Merge branch '2.1.x' into 2.2.x
Closes gh-19685
2 parents 6675510 + 91fff91 commit 101fd14

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/util/ResourceUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -102,7 +102,7 @@ private static List<String> getUrlsFromPrefixedWildcardPath(String path, ClassLo
102102
List<String> result = new ArrayList<>();
103103
for (Resource resource : resources) {
104104
if (resource.exists()) {
105-
if (resource.getURI().getScheme().equals("file") && resource.getFile().isDirectory()) {
105+
if ("file".equals(resource.getURI().getScheme()) && resource.getFile().isDirectory()) {
106106
result.addAll(getChildFiles(resource));
107107
continue;
108108
}
@@ -124,7 +124,7 @@ private static List<String> getChildFiles(Resource resource) throws IOException
124124
}
125125

126126
private static String absolutePath(Resource resource) throws IOException {
127-
if (!resource.getURI().getScheme().equals("file")) {
127+
if (!"file".equals(resource.getURI().getScheme())) {
128128
return resource.getURL().toExternalForm();
129129
}
130130
return resource.getFile().getAbsoluteFile().toURI().toString();

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/restdocs/RestDocsWebTestClientBuilderCustomizer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,7 +61,7 @@ private boolean isStandardPort(String scheme, Integer port) {
6161
if (port == null) {
6262
return true;
6363
}
64-
return (scheme.equals("http") && port == 80) || (scheme.equals("https") && port == 443);
64+
return ("http".equals(scheme) && port == 80) || ("https".equals(scheme) && port == 443);
6565
}
6666

6767
}

0 commit comments

Comments
 (0)