Replace some String.length() checks with String.isEmpty()
Closes gh-10451
This commit is contained in:
committed by
Stephane Nicoll
parent
b08e51f0b3
commit
756398b52c
@@ -63,7 +63,7 @@ final class SpringBootConfigurationFinder {
|
||||
}
|
||||
|
||||
private Class<?> scanPackage(String source) {
|
||||
while (source.length() > 0) {
|
||||
while (!source.isEmpty()) {
|
||||
Set<BeanDefinition> components = this.scanner.findCandidateComponents(source);
|
||||
if (!components.isEmpty()) {
|
||||
Assert.state(components.size() == 1,
|
||||
|
||||
@@ -98,7 +98,7 @@ public class MockServerRestTemplateCustomizer implements RestTemplateCustomizer
|
||||
}
|
||||
|
||||
public MockRestServiceServer getServer() {
|
||||
Assert.state(this.servers.size() > 0,
|
||||
Assert.state(!this.servers.isEmpty(),
|
||||
"Unable to return a single MockRestServiceServer since "
|
||||
+ "MockServerRestTemplateCustomizer has not been bound to "
|
||||
+ "a RestTemplate");
|
||||
|
||||
Reference in New Issue
Block a user