Merge branch '1.4.x' into 1.5.x
This commit is contained in:
@@ -91,7 +91,7 @@ public class PropertiesConfigurationFactory<T>
|
||||
* @see #PropertiesConfigurationFactory(Class)
|
||||
*/
|
||||
public PropertiesConfigurationFactory(T target) {
|
||||
Assert.notNull(target);
|
||||
Assert.notNull(target, "target must not be null");
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class PropertiesConfigurationFactory<T>
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertiesConfigurationFactory(Class<?> type) {
|
||||
Assert.notNull(type);
|
||||
Assert.notNull(type, "type must not be null");
|
||||
this.target = (T) BeanUtils.instantiate(type);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class YamlConfigurationFactory<T>
|
||||
* @param type the root type
|
||||
*/
|
||||
public YamlConfigurationFactory(Class<?> type) {
|
||||
Assert.notNull(type);
|
||||
Assert.notNull(type, "type must not be null");
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
@@ -354,8 +354,7 @@ public class TomcatEmbeddedServletContainerFactory
|
||||
Compression compression = getCompression();
|
||||
protocol.setCompression("on");
|
||||
protocol.setCompressionMinSize(compression.getMinResponseSize());
|
||||
protocol.setCompressableMimeType(
|
||||
StringUtils.arrayToCommaDelimitedString(compression.getMimeTypes()));
|
||||
configureCompressibleMimeTypes(protocol, compression);
|
||||
if (getCompression().getExcludedUserAgents() != null) {
|
||||
protocol.setNoCompressionUserAgents(
|
||||
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.
|
||||
* @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");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,7 @@ public class CompressionTests {
|
||||
|
||||
private String[] getTomcatDefaultCompressableMimeTypes() {
|
||||
Http11NioProtocol protocol = new Http11NioProtocol();
|
||||
return protocol.getCompressableMimeTypes();
|
||||
return protocol.getCompressibleMimeTypes();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user