Merge pull request #14667 from izeye

* pr/14667:
  Polish contribution
  Polish
pull/14614/merge
Stephane Nicoll 6 years ago
commit a20046f8a3

@ -128,10 +128,11 @@ public final class WebFluxTags {
}
/**
* Creates a {@code outcome} tag based on the response status of the given
* Creates an {@code outcome} tag based on the response status of the given
* {@code exchange}.
* @param exchange the exchange
* @return the outcome tag derived from the response status
* @since 2.1.0
*/
public static Tag outcome(ServerWebExchange exchange) {
HttpStatus status = exchange.getResponse().getStatusCode();

@ -165,9 +165,10 @@ public final class WebMvcTags {
}
/**
* Creates a {@code outcome} tag based on the status of the given {@code response}.
* Creates an {@code outcome} tag based on the status of the given {@code response}.
* @param response the HTTP response
* @return the outcome tag derived from the status of the response
* @since 2.1.0
*/
public static Tag outcome(HttpServletResponse response) {
if (response != null) {
@ -181,7 +182,7 @@ public final class WebMvcTags {
if (status < 400) {
return OUTCOME_REDIRECTION;
}
else if (status < 500) {
if (status < 500) {
return OUTCOME_CLIENT_ERROR;
}
return OUTCOME_SERVER_ERROR;

@ -156,7 +156,7 @@ public class Neo4jDataAutoConfigurationTests {
}
@Test
public void providesARequestScopedBookmarkManangerIfNecessaryAndPossible() {
public void providesARequestScopedBookmarkManagerIfNecessaryAndPossible() {
this.contextRunner
.withUserConfiguration(BookmarkManagementEnabledConfiguration.class)
.run((context) -> {
@ -168,7 +168,7 @@ public class Neo4jDataAutoConfigurationTests {
}
@Test
public void providesASingletonScopedBookmarkManangerIfNecessaryAndPossible() {
public void providesASingletonScopedBookmarkManagerIfNecessaryAndPossible() {
new ApplicationContextRunner()
.withUserConfiguration(TestConfiguration.class,
BookmarkManagementEnabledConfiguration.class)

@ -130,7 +130,7 @@ final class ClassLoaderFilesResourcePatternResolver implements ResourcePatternRe
for (Entry<String, ClassLoaderFile> entry : sourceFolder.getFilesEntrySet()) {
String name = entry.getKey();
ClassLoaderFile file = entry.getValue();
if (entry.getValue().getKind() != Kind.DELETED
if (file.getKind() != Kind.DELETED
&& this.antPathMatcher.match(trimmedLocationPattern, name)) {
URL url = new URL("reloaded", null, -1, "/" + name,
new ClassLoaderFileURLStreamHandler(file));

@ -22,11 +22,11 @@ repositories {
dependencies {
implementation localGroovy()
implementation gradleApi()
implementation fileTree(dir: 'target/dependencies/compile', include: '*.jar')
implementation gradleApi()
implementation fileTree(dir: 'target/dependencies/compile', include: '*.jar')
testImplementation gradleTestKit()
testImplementation 'org.apache.commons:commons-compress:1.13'
testImplementation fileTree(dir: 'target/dependencies/test', include: '*.jar')
testImplementation 'org.apache.commons:commons-compress:1.13'
testImplementation fileTree(dir: 'target/dependencies/test', include: '*.jar')
}
jar {

@ -99,17 +99,15 @@ final class BindConverter {
new ResolvableTypeDescriptor(type, annotations));
}
public static BindConverter get(ConversionService conversionService,
static BindConverter get(ConversionService conversionService,
Consumer<PropertyEditorRegistry> propertyEditorInitializer) {
if (conversionService == ApplicationConversionService.getSharedInstance()
&& propertyEditorInitializer == null) {
BindConverter instance = sharedInstance;
if (instance == null) {
instance = new BindConverter(conversionService,
if (sharedInstance == null) {
sharedInstance = new BindConverter(conversionService,
propertyEditorInitializer);
sharedInstance = instance;
}
return instance;
return sharedInstance;
}
return new BindConverter(conversionService, propertyEditorInitializer);
}

@ -101,6 +101,7 @@ public enum DatabaseDriver {
/**
* SAP - SAP Hana Database - HDB.
* @since 2.1.0
*/
SAP("HDB", "com.sap.db.jdbc.Driver", "com.sap.db.jdbcext.XADataSourceSAP",
"SELECT 1 FROM DUMMY"),

@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -161,15 +161,13 @@ public class DevToolsIntegrationTests {
String.class)).isEqualTo("two");
controller("com.example.ControllerOne").withRequestMapping("one")
.withRequestMapping("three").build();
int port = awaitServerPort();
assertThat(
template.getForObject("http://localhost:" + port + "/one", String.class))
.isEqualTo("one");
assertThat(
template.getForObject("http://localhost:" + port + "/two", String.class))
.isEqualTo("two");
assertThat(template.getForObject("http://localhost:" + port + "/three",
String.class)).isEqualTo("three");
urlBase = "http://localhost:" + awaitServerPort();
assertThat(template.getForObject(urlBase + "/one", String.class))
.isEqualTo("one");
assertThat(template.getForObject(urlBase + "/two", String.class))
.isEqualTo("two");
assertThat(template.getForObject(urlBase + "/three", String.class))
.isEqualTo("three");
}
@Test

Loading…
Cancel
Save