Merge pull request #14884 from izeye

* pr/14884:
  Polish
pull/14884/merge
Stephane Nicoll 6 years ago
commit ebcc5d8b1f

@ -33,17 +33,17 @@ public class AppOpticsProperties extends StepRegistryProperties {
/**
* URI to ship metrics to.
*/
public String uri = "https://api.appoptics.com/v1/measurements";
private String uri = "https://api.appoptics.com/v1/measurements";
/**
* AppOptics API token.
*/
public String apiToken;
private String apiToken;
/**
* Tag that will be mapped to "@host" when shipping metrics to AppOptics.
*/
public String hostTag = "instance";
private String hostTag = "instance";
/**
* Number of measurements per request to use for this backend. If more measurements

@ -58,7 +58,8 @@ public class DiskSpaceHealthIndicatorProperties {
}
public void setThreshold(DataSize threshold) {
Assert.isTrue(!threshold.isNegative(), "threshold must be greater than 0");
Assert.isTrue(!threshold.isNegative(),
"threshold must be greater than or equal to 0");
this.threshold = threshold;
}

@ -116,9 +116,9 @@ public class MvcWebEndpointIntegrationTests extends
assertThat(getMatchResult("/spring.do")).isNull();
}
private RequestMatchResult getMatchResult(String s) {
private RequestMatchResult getMatchResult(String servletPath) {
MockHttpServletRequest request = new MockHttpServletRequest();
request.setServletPath(s);
request.setServletPath(servletPath);
AnnotationConfigServletWebServerApplicationContext context = createApplicationContext();
context.register(TestEndpointConfiguration.class);
context.refresh();

@ -426,12 +426,7 @@ class OnBeanCondition extends FilteringSpringBootCondition
}
private boolean hasAtLeastOne(List<?>... lists) {
for (List<?> list : lists) {
if (!list.isEmpty()) {
return true;
}
}
return false;
return Arrays.stream(lists).anyMatch((list) -> !list.isEmpty());
}
protected String annotationName() {

@ -36,11 +36,10 @@ import org.springframework.web.context.WebApplicationContext;
/**
* Provides a {@link BookmarkManager} for Neo4j's bookmark support based on Caffeine if
* available. Depending on the applications kind (web or not) the bookmark manager will be
* bound to the application or the request, as recommend by Spring Data Neo4j.
* available. Depending on the application's type (web or not) the bookmark manager will
* be bound to the application or the request, as recommend by Spring Data Neo4j.
*
* @author Michael Simons
* @since 2.1.0
*/
@Configuration
@ConditionalOnClass({ Caffeine.class, CaffeineCacheManager.class })

@ -330,7 +330,7 @@ public class ServerProperties {
private DataSize maxHttpPostSize = DataSize.ofMegabytes(2);
/**
* Maximum size in bytes of the HTTP message header.
* Maximum size of the HTTP message header.
*/
private DataSize maxHttpHeaderSize = DataSize.ofBytes(0);

@ -151,6 +151,7 @@ public class DeferredLog implements Log {
/**
* Switch from deferred logging to immediate logging to the specified destination.
* @param destination the new log destination
* @since 2.1.0
*/
public void switchTo(Class<?> destination) {
switchTo(LogFactory.getLog(destination));
@ -159,6 +160,7 @@ public class DeferredLog implements Log {
/**
* Switch from deferred logging to immediate logging to the specified destination.
* @param destination the new log destination
* @since 2.1.0
*/
public void switchTo(Log destination) {
synchronized (this.lines) {

@ -167,7 +167,7 @@ public abstract class AbstractJsonParserTests {
}
@Test
public void escapeQuote() {
public void escapeDoubleQuote() {
String input = "{\"foo\": \"\\\"bar\\\"\"}";
Map<String, Object> map = this.parser.parseMap(input);
assertThat(map.get("foo")).isEqualTo("\"bar\"");

Loading…
Cancel
Save