Merge branch '1.4.x' into 1.5.x
This commit is contained in:
commit
c74f0a70ca
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2016 the original author or authors.
|
* Copyright 2012-2017 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -120,7 +120,7 @@ public class ShellProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDisabledCommands(String[] disabledCommands) {
|
public void setDisabledCommands(String[] disabledCommands) {
|
||||||
Assert.notEmpty(disabledCommands);
|
Assert.notEmpty(disabledCommands, "disabledCommands must not be empty");
|
||||||
this.disabledCommands = disabledCommands;
|
this.disabledCommands = disabledCommands;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ public class ShellProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDisabledPlugins(String[] disabledPlugins) {
|
public void setDisabledPlugins(String[] disabledPlugins) {
|
||||||
Assert.notEmpty(disabledPlugins);
|
Assert.notEmpty(disabledPlugins, "disabledPlugins must not be empty");
|
||||||
this.disabledPlugins = disabledPlugins;
|
this.disabledPlugins = disabledPlugins;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2016 the original author or authors.
|
* Copyright 2012-2017 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -72,7 +72,7 @@ public class StatsdMetricWriter implements MetricWriter, Closeable {
|
||||||
* @param client StatsD client to write metrics with
|
* @param client StatsD client to write metrics with
|
||||||
*/
|
*/
|
||||||
public StatsdMetricWriter(StatsDClient client) {
|
public StatsdMetricWriter(StatsDClient client) {
|
||||||
Assert.notNull(client);
|
Assert.notNull(client, "client must not be null");
|
||||||
this.client = client;
|
this.client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,6 @@ public class WebRequestTraceFilterTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public void filterAddsTimeTaken() throws Exception {
|
public void filterAddsTimeTaken() throws Exception {
|
||||||
MockHttpServletRequest request = spy(new MockHttpServletRequest("GET", "/foo"));
|
MockHttpServletRequest request = spy(new MockHttpServletRequest("GET", "/foo"));
|
||||||
MockHttpServletResponse response = new MockHttpServletResponse();
|
MockHttpServletResponse response = new MockHttpServletResponse();
|
||||||
|
|
|
@ -56,6 +56,7 @@ abstract class HazelcastInstanceConfiguration {
|
||||||
@Bean
|
@Bean
|
||||||
public HazelcastCacheManager cacheManager(
|
public HazelcastCacheManager cacheManager(
|
||||||
HazelcastInstance existingHazelcastInstance) throws IOException {
|
HazelcastInstance existingHazelcastInstance) throws IOException {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
Resource config = this.cacheProperties.getHazelcast().getConfig();
|
Resource config = this.cacheProperties.getHazelcast().getConfig();
|
||||||
Resource location = this.cacheProperties.resolveConfigLocation(config);
|
Resource location = this.cacheProperties.resolveConfigLocation(config);
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
|
@ -86,6 +87,7 @@ abstract class HazelcastInstanceConfiguration {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public HazelcastInstance hazelcastInstance() throws IOException {
|
public HazelcastInstance hazelcastInstance() throws IOException {
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
Resource config = this.cacheProperties.getHazelcast().getConfig();
|
Resource config = this.cacheProperties.getHazelcast().getConfig();
|
||||||
Resource location = this.cacheProperties.resolveConfigLocation(config);
|
Resource location = this.cacheProperties.resolveConfigLocation(config);
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
|
|
|
@ -646,7 +646,7 @@ public class ConditionalOnMissingBeanTests {
|
||||||
public static class ExampleFactoryBean implements FactoryBean<ExampleBean> {
|
public static class ExampleFactoryBean implements FactoryBean<ExampleBean> {
|
||||||
|
|
||||||
public ExampleFactoryBean(String value) {
|
public ExampleFactoryBean(String value) {
|
||||||
Assert.state(!value.contains("$"));
|
Assert.state(!value.contains("$"), "value must not contain $");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -669,7 +669,7 @@ public class ConditionalOnMissingBeanTests {
|
||||||
public static class NonspecificFactoryBean implements FactoryBean<Object> {
|
public static class NonspecificFactoryBean implements FactoryBean<Object> {
|
||||||
|
|
||||||
public NonspecificFactoryBean(String value) {
|
public NonspecificFactoryBean(String value) {
|
||||||
Assert.state(!value.contains("$"));
|
Assert.state(!value.contains("$"), "value must not contain $");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class PropertiesConfigurationFactory<T>
|
||||||
* @see #PropertiesConfigurationFactory(Class)
|
* @see #PropertiesConfigurationFactory(Class)
|
||||||
*/
|
*/
|
||||||
public PropertiesConfigurationFactory(T target) {
|
public PropertiesConfigurationFactory(T target) {
|
||||||
Assert.notNull(target);
|
Assert.notNull(target, "target must not be null");
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ public class PropertiesConfigurationFactory<T>
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public PropertiesConfigurationFactory(Class<?> type) {
|
public PropertiesConfigurationFactory(Class<?> type) {
|
||||||
Assert.notNull(type);
|
Assert.notNull(type, "type must not be null");
|
||||||
this.target = (T) BeanUtils.instantiate(type);
|
this.target = (T) BeanUtils.instantiate(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class YamlConfigurationFactory<T>
|
||||||
* @param type the root type
|
* @param type the root type
|
||||||
*/
|
*/
|
||||||
public YamlConfigurationFactory(Class<?> type) {
|
public YamlConfigurationFactory(Class<?> type) {
|
||||||
Assert.notNull(type);
|
Assert.notNull(type, "type must not be null");
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -354,8 +354,7 @@ public class TomcatEmbeddedServletContainerFactory
|
||||||
Compression compression = getCompression();
|
Compression compression = getCompression();
|
||||||
protocol.setCompression("on");
|
protocol.setCompression("on");
|
||||||
protocol.setCompressionMinSize(compression.getMinResponseSize());
|
protocol.setCompressionMinSize(compression.getMinResponseSize());
|
||||||
protocol.setCompressableMimeType(
|
configureCompressibleMimeTypes(protocol, compression);
|
||||||
StringUtils.arrayToCommaDelimitedString(compression.getMimeTypes()));
|
|
||||||
if (getCompression().getExcludedUserAgents() != null) {
|
if (getCompression().getExcludedUserAgents() != null) {
|
||||||
protocol.setNoCompressionUserAgents(
|
protocol.setNoCompressionUserAgents(
|
||||||
StringUtils.arrayToCommaDelimitedString(
|
StringUtils.arrayToCommaDelimitedString(
|
||||||
|
@ -364,6 +363,13 @@ public class TomcatEmbeddedServletContainerFactory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
private void configureCompressibleMimeTypes(AbstractHttp11Protocol<?> protocol,
|
||||||
|
Compression compression) {
|
||||||
|
protocol.setCompressableMimeType(
|
||||||
|
StringUtils.arrayToCommaDelimitedString(compression.getMimeTypes()));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure Tomcat's {@link AbstractHttp11JsseProtocol} for SSL.
|
* Configure Tomcat's {@link AbstractHttp11JsseProtocol} for SSL.
|
||||||
* @param protocol the protocol
|
* @param protocol the protocol
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2016 the original author or authors.
|
* Copyright 2012-2017 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -36,7 +36,7 @@ public class CompressionTests {
|
||||||
|
|
||||||
private String[] getTomcatDefaultCompressableMimeTypes() {
|
private String[] getTomcatDefaultCompressableMimeTypes() {
|
||||||
Http11NioProtocol protocol = new Http11NioProtocol();
|
Http11NioProtocol protocol = new Http11NioProtocol();
|
||||||
return protocol.getCompressableMimeTypes();
|
return protocol.getCompressibleMimeTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue