Polish
Closes gh-27431
This commit is contained in:
@@ -98,9 +98,8 @@ public class SpringApplicationBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the
|
||||
* given sources. Subclasses may override in order to provide a custom subclass of
|
||||
* {@link org.springframework.boot.SpringApplication}
|
||||
* Creates a new {@link SpringApplication} instance from the given sources. Subclasses
|
||||
* may override in order to provide a custom subclass of {@link SpringApplication}.
|
||||
* @param sources the sources
|
||||
* @return the {@link org.springframework.boot.SpringApplication} instance
|
||||
* @since 1.1.0
|
||||
|
||||
@@ -174,7 +174,7 @@ public final class DataSourceBuilder<T extends DataSource> {
|
||||
Set<DataSourceProperty> applied = new HashSet<>();
|
||||
for (DataSourceProperty property : DataSourceProperty.values()) {
|
||||
String value = this.values.get(property);
|
||||
if (!this.values.containsKey(property) && deriveFromProperties != null && properties.canSet(property)) {
|
||||
if (value == null && deriveFromProperties != null && properties.canSet(property)) {
|
||||
value = deriveFromProperties.get(this.deriveFrom, property);
|
||||
}
|
||||
if (value != null) {
|
||||
@@ -262,7 +262,7 @@ public final class DataSourceBuilder<T extends DataSource> {
|
||||
|
||||
PASSWORD(false, "password");
|
||||
|
||||
private boolean optional;
|
||||
private final boolean optional;
|
||||
|
||||
private final String[] names;
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class RandomValuePropertySourceTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void longRangeWhenLowerBoundNegativeShouldFailWithIllegalArgumentException() {
|
||||
void longRangeWhenLowerBoundNegative() {
|
||||
Long value = (Long) this.source.getProperty("random.long[-4,4]");
|
||||
assertThat(value >= -4).isTrue();
|
||||
assertThat(value < 4).isTrue();
|
||||
|
||||
Reference in New Issue
Block a user