Skip to content

Commit bfd62ab

Browse files
committed
Merge pull request spring-projects#7030 from izeye:polish-20160927
* pr/7030: Polish
2 parents 73f153d + 30a6776 commit bfd62ab

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,16 @@ static class DataSourceAvailableCondition extends SpringBootCondition {
224224
public ConditionOutcome getMatchOutcome(ConditionContext context,
225225
AnnotatedTypeMetadata metadata) {
226226
ConditionMessage.Builder message = ConditionMessage
227-
.forCondition("EmbeddedDataAvailable");
227+
.forCondition("DataSourceAvailable");
228228
if (hasBean(context, DataSource.class)
229229
|| hasBean(context, XADataSource.class)) {
230230
return ConditionOutcome
231-
.match(message.foundExactly("existing database bean"));
231+
.match(message.foundExactly("existing data source bean"));
232232
}
233233
if (anyMatches(context, metadata, this.pooledCondition,
234234
this.embeddedCondition)) {
235235
return ConditionOutcome
236-
.match(message.foundExactly("existing auto-configured database"));
236+
.match(message.foundExactly("existing auto-configured data source bean"));
237237
}
238238
return ConditionOutcome
239239
.noMatch(message.didNotFind("any existing data source bean").atAll());

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/resource/OAuth2ResourceServerConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
127127
}
128128
if (StringUtils.hasText(resolver.getProperty("user-info-uri"))) {
129129
return ConditionOutcome
130-
.match(message.foundExactly("user-info-url property"));
130+
.match(message.foundExactly("user-info-uri property"));
131131
}
132132
if (ClassUtils.isPresent(AUTHORIZATION_ANNOTATION, null)) {
133133
if (AuthorizationServerEndpointsConfigurationBeanCondition

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/OnEnabledResourceChainCondition.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
*/
3737
class OnEnabledResourceChainCondition extends SpringBootCondition {
3838

39-
private static final String WEBJAR_ASSERT_LOCATOR = "org.webjars.WebJarAssetLocator";
39+
private static final String WEBJAR_ASSET_LOCATOR = "org.webjars.WebJarAssetLocator";
4040

4141
@Override
4242
public ConditionOutcome getMatchOutcome(ConditionContext context,
@@ -50,13 +50,13 @@ public ConditionOutcome getMatchOutcome(ConditionContext context,
5050
ConditionMessage.Builder message = ConditionMessage
5151
.forCondition(ConditionalOnEnabledResourceChain.class);
5252
if (match == null) {
53-
if (ClassUtils.isPresent(WEBJAR_ASSERT_LOCATOR,
53+
if (ClassUtils.isPresent(WEBJAR_ASSET_LOCATOR,
5454
getClass().getClassLoader())) {
5555
return ConditionOutcome
56-
.match(message.found("class").items(WEBJAR_ASSERT_LOCATOR));
56+
.match(message.found("class").items(WEBJAR_ASSET_LOCATOR));
5757
}
5858
return ConditionOutcome
59-
.noMatch(message.didNotFind("class").items(WEBJAR_ASSERT_LOCATOR));
59+
.noMatch(message.didNotFind("class").items(WEBJAR_ASSET_LOCATOR));
6060
}
6161
if (match) {
6262
return ConditionOutcome.match(message.because("enabled"));

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionMessageTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ public void isEmptyWhenNotEmptyShouldReturnFalse() throws Exception {
4545
}
4646

4747
@Test
48-
public void toStringWhenHasMessageShouldReturnMessage() throws Exception {
48+
public void toStringWhenEmptyShouldReturnEmptyString() throws Exception {
4949
ConditionMessage message = ConditionMessage.empty();
5050
assertThat(message.toString()).isEqualTo("");
5151
}
5252

5353
@Test
54-
public void toStringWhenEmptyShouldReturnEmptyString() throws Exception {
54+
public void toStringWhenHasMessageShouldReturnMessage() throws Exception {
5555
ConditionMessage message = ConditionMessage.of("Test");
5656
assertThat(message.toString()).isEqualTo("Test");
5757
}

spring-boot-test/src/test/java/org/springframework/boot/test/mock/mockito/QualifierDefinitionTests.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
import java.lang.reflect.Field;
2222

2323
import org.junit.Before;
24-
import org.junit.Rule;
2524
import org.junit.Test;
26-
import org.junit.rules.ExpectedException;
2725
import org.mockito.ArgumentCaptor;
2826
import org.mockito.Captor;
2927
import org.mockito.Mock;
@@ -47,9 +45,6 @@
4745
*/
4846
public class QualifierDefinitionTests {
4947

50-
@Rule
51-
public ExpectedException thrown = ExpectedException.none();
52-
5348
@Mock
5449
private ConfigurableListableBeanFactory beanFactory;
5550

spring-boot-tools/spring-boot-maven-plugin/src/it/run-devtools/verify.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import static org.junit.Assert.assertTrue
22

33
def file = new File(basedir, "build.log")
44
assertTrue 'Devtools should have been detected', file.text.contains('Fork mode disabled, devtools will be disabled')
5-
assertTrue 'Application should have ran', file.text.contains("I haz been run")
5+
assertTrue 'Application should have run', file.text.contains("I haz been run")
66

0 commit comments

Comments
 (0)