Skip to content

Commit

Permalink
Polish condition name
Browse files Browse the repository at this point in the history
  • Loading branch information
snicoll committed Sep 3, 2018
1 parent ba18fb5 commit 42bf594
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
Expand Up @@ -34,7 +34,7 @@
* @author Stephane Nicoll
* @since 2.0.5
*/
public class OnListCondition extends SpringBootCondition {
public class OnPropertyListCondition extends SpringBootCondition {

private static final Bindable<List<String>> SIMPLE_LIST = Bindable
.listOf(String.class);
Expand All @@ -49,7 +49,7 @@ public class OnListCondition extends SpringBootCondition {
* @param messageBuilder a message builder supplier that should provide a fresh
* instance on each call
*/
protected OnListCondition(String propertyName,
protected OnPropertyListCondition(String propertyName,
Supplier<ConditionMessage.Builder> messageBuilder) {
this.propertyName = propertyName;
this.messageBuilder = messageBuilder;
Expand Down
Expand Up @@ -17,7 +17,7 @@
package org.springframework.boot.autoconfigure.couchbase;

import org.springframework.boot.autoconfigure.condition.ConditionMessage;
import org.springframework.boot.autoconfigure.condition.OnListCondition;
import org.springframework.boot.autoconfigure.condition.OnPropertyListCondition;

/**
* Condition to determine if {@code spring.couchbase.bootstrap-hosts} is specified.
Expand All @@ -26,7 +26,7 @@
* @author Madhura Bhave
* @author Eneias Silva
*/
class OnBootstrapHostsCondition extends OnListCondition {
class OnBootstrapHostsCondition extends OnPropertyListCondition {

OnBootstrapHostsCondition() {
super("spring.couchbase.bootstrap-hosts",
Expand Down
Expand Up @@ -17,15 +17,15 @@
package org.springframework.boot.autoconfigure.webservices;

import org.springframework.boot.autoconfigure.condition.ConditionMessage;
import org.springframework.boot.autoconfigure.condition.OnListCondition;
import org.springframework.boot.autoconfigure.condition.OnPropertyListCondition;

/**
* Condition to determine if {@code spring.webservices.wsdl-locations} is specified.
*
* @author Eneias Silva
* @author Stephane Nicoll
*/
class OnWsdlLocationsCondition extends OnListCondition {
class OnWsdlLocationsCondition extends OnPropertyListCondition {

OnWsdlLocationsCondition() {
super("spring.webservices.wsdl-locations",
Expand Down
Expand Up @@ -26,11 +26,11 @@
import static org.assertj.core.api.Assertions.assertThat;

/**
* Tests for {@link OnListCondition}.
* Tests for {@link OnPropertyListCondition}.
*
* @author Stephane Nicoll
*/
public class OnListConditionTests {
public class OnPropertyListConditionTests {

private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withUserConfiguration(TestConfig.class);
Expand Down Expand Up @@ -65,7 +65,7 @@ public void propertyDefinedAsListRelaxed() {
}

@Configuration
@Conditional(TestListCondition.class)
@Conditional(TestPropertyListCondition.class)
protected static class TestConfig {

@Bean
Expand All @@ -75,9 +75,9 @@ public String foo() {

}

static class TestListCondition extends OnListCondition {
static class TestPropertyListCondition extends OnPropertyListCondition {

TestListCondition() {
TestPropertyListCondition() {
super("spring.test.my-list", () -> ConditionMessage.forCondition("test"));
}

Expand Down

0 comments on commit 42bf594

Please sign in to comment.