Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
5dad7182
Commit
5dad7182
authored
Apr 07, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address deprecation warnings
parent
d45d9452
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
16 deletions
+22
-16
ShellProperties.java
...framework/boot/actuate/autoconfigure/ShellProperties.java
+3
-3
StatsdMetricWriter.java
...ework/boot/actuate/metrics/statsd/StatsdMetricWriter.java
+2
-2
ConditionalOnMissingBeanTests.java
...utoconfigure/condition/ConditionalOnMissingBeanTests.java
+2
-2
PropertiesConfigurationFactory.java
...ngframework/boot/bind/PropertiesConfigurationFactory.java
+3
-3
YamlConfigurationFactory.java
...g/springframework/boot/bind/YamlConfigurationFactory.java
+2
-2
TomcatEmbeddedServletContainerFactory.java
...mbedded/tomcat/TomcatEmbeddedServletContainerFactory.java
+8
-2
CompressionTests.java
...ringframework/boot/context/embedded/CompressionTests.java
+2
-2
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java
View file @
5dad7182
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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.
...
@@ -118,7 +118,7 @@ public class ShellProperties {
...
@@ -118,7 +118,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
;
}
}
...
@@ -127,7 +127,7 @@ public class ShellProperties {
...
@@ -127,7 +127,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
;
}
}
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/statsd/StatsdMetricWriter.java
View file @
5dad7182
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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 {
...
@@ -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
;
}
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/ConditionalOnMissingBeanTests.java
View file @
5dad7182
...
@@ -606,7 +606,7 @@ public class ConditionalOnMissingBeanTests {
...
@@ -606,7 +606,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
...
@@ -629,7 +629,7 @@ public class ConditionalOnMissingBeanTests {
...
@@ -629,7 +629,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
...
...
spring-boot/src/main/java/org/springframework/boot/bind/PropertiesConfigurationFactory.java
View file @
5dad7182
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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.
...
@@ -94,7 +94,7 @@ public class PropertiesConfigurationFactory<T>
...
@@ -94,7 +94,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
;
}
}
...
@@ -105,7 +105,7 @@ public class PropertiesConfigurationFactory<T>
...
@@ -105,7 +105,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
);
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/bind/YamlConfigurationFactory.java
View file @
5dad7182
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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.
...
@@ -76,7 +76,7 @@ public class YamlConfigurationFactory<T>
...
@@ -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
;
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java
View file @
5dad7182
...
@@ -352,8 +352,7 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -352,8 +352,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
(
...
@@ -362,6 +361,13 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -362,6 +361,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
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/CompressionTests.java
View file @
5dad7182
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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 {
...
@@ -36,7 +36,7 @@ public class CompressionTests {
private
String
[]
getTomcatDefaultCompressableMimeTypes
()
{
private
String
[]
getTomcatDefaultCompressableMimeTypes
()
{
Http11NioProtocol
protocol
=
new
Http11NioProtocol
();
Http11NioProtocol
protocol
=
new
Http11NioProtocol
();
return
protocol
.
getCompress
a
bleMimeTypes
();
return
protocol
.
getCompress
i
bleMimeTypes
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment