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
15686ed4
Commit
15686ed4
authored
Sep 08, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat code
parent
0f6b60d8
Changes
43
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
73 additions
and
74 deletions
+73
-74
CrshAutoConfiguration.java
...ork/boot/actuate/autoconfigure/CrshAutoConfiguration.java
+2
-2
EndpointWebMvcChildContextConfiguration.java
...utoconfigure/EndpointWebMvcChildContextConfiguration.java
+1
-1
ConfigurationPropertiesReportEndpoint.java
...tuate/endpoint/ConfigurationPropertiesReportEndpoint.java
+1
-1
ShutdownEndpoint.java
...ringframework/boot/actuate/endpoint/ShutdownEndpoint.java
+2
-2
AuditListenerTests.java
...ework/boot/actuate/audit/listener/AuditListenerTests.java
+1
-1
EndpointAutoConfigurationTests.java
...actuate/autoconfigure/EndpointAutoConfigurationTests.java
+1
-1
AbstractEndpointTests.java
...ramework/boot/actuate/endpoint/AbstractEndpointTests.java
+4
-4
MetricsEndpointTests.java
...framework/boot/actuate/endpoint/MetricsEndpointTests.java
+1
-1
RequestMappingEndpointTests.java
...rk/boot/actuate/endpoint/RequestMappingEndpointTests.java
+2
-2
TraceEndpointTests.java
...ngframework/boot/actuate/endpoint/TraceEndpointTests.java
+1
-1
HealthMvcEndpointTests.java
...ork/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
+1
-1
MetricsMvcEndpointTests.java
...rk/boot/actuate/endpoint/mvc/MetricsMvcEndpointTests.java
+1
-1
PrefixMetricGroupExporterTests.java
...ctuate/metrics/export/PrefixMetricGroupExporterTests.java
+1
-1
RedisMultiMetricRepositoryTests.java
...ics/repository/redis/RedisMultiMetricRepositoryTests.java
+13
-13
DropwizardMetricWriterTests.java
...t/actuate/metrics/writer/DropwizardMetricWriterTests.java
+2
-1
AuthorizationAuditListenerTests.java
...oot/actuate/security/AuthorizationAuditListenerTests.java
+1
-1
InMemoryTraceRepositoryTests.java
...work/boot/actuate/trace/InMemoryTraceRepositoryTests.java
+6
-6
JacksonProperties.java
...amework/boot/autoconfigure/jackson/JacksonProperties.java
+1
-2
DatabaseDriver.java
...ringframework/boot/autoconfigure/jdbc/DatabaseDriver.java
+2
-1
JndiPropertiesHidingClassLoader.java
...t/autoconfigure/jndi/JndiPropertiesHidingClassLoader.java
+1
-1
MongoDataAutoConfigurationTests.java
.../autoconfigure/mongo/MongoDataAutoConfigurationTests.java
+1
-1
HttpMessageConvertersTests.java
...rk/boot/autoconfigure/web/HttpMessageConvertersTests.java
+2
-2
DefaultCommandFactory.java
...a/org/springframework/boot/cli/DefaultCommandFactory.java
+1
-1
GroovyTemplate.java
.../java/org/springframework/boot/groovy/GroovyTemplate.java
+1
-1
CustomCommandFactory.java
...t-cli/src/test/java/cli/command/CustomCommandFactory.java
+1
-1
CliTester.java
...src/test/java/org/springframework/boot/cli/CliTester.java
+2
-1
ProjectGenerationRequestTests.java
.../boot/cli/command/init/ProjectGenerationRequestTests.java
+1
-1
SampleAtmosphereApplication.java
...ere/src/main/java/sample/SampleAtmosphereApplication.java
+1
-1
FieldValuesParser.java
...configurationprocessor/fieldvalues/FieldValuesParser.java
+1
-2
NotAnnotated.java
...amework/boot/configurationsample/simple/NotAnnotated.java
+0
-1
Dependency.java
...org/springframework/boot/dependency/tools/Dependency.java
+1
-1
ManagedDependencies.java
...gframework/boot/dependency/tools/ManagedDependencies.java
+1
-1
ManagedDependenciesDelegateTests.java
...ot/dependency/tools/ManagedDependenciesDelegateTests.java
+1
-1
PropertiesLauncherTests.java
.../springframework/boot/loader/PropertiesLauncherTests.java
+1
-2
DependencyFilterMojoTests.java
...springframework/boot/maven/DependencyFilterMojoTests.java
+2
-2
AtomikosDependsOnBeanFactoryPostProcessor.java
...a/atomikos/AtomikosDependsOnBeanFactoryPostProcessor.java
+1
-1
TestRestTemplate.java
.../java/org/springframework/boot/test/TestRestTemplate.java
+1
-1
ResourceBannerTests.java
...st/java/org/springframework/boot/ResourceBannerTests.java
+1
-1
SpringApplicationTests.java
...java/org/springframework/boot/SpringApplicationTests.java
+1
-1
PropertySourcesPropertyValuesTests.java
...amework/boot/bind/PropertySourcesPropertyValuesTests.java
+4
-4
SpringApplicationBuilderTests.java
...framework/boot/builder/SpringApplicationBuilderTests.java
+1
-1
MockEmbeddedServletContainerFactory.java
...context/embedded/MockEmbeddedServletContainerFactory.java
+1
-1
EnableConfigurationPropertiesTests.java
...ontext/properties/EnableConfigurationPropertiesTests.java
+1
-1
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java
View file @
15686ed4
...
@@ -338,7 +338,7 @@ public class CrshAutoConfiguration {
...
@@ -338,7 +338,7 @@ public class CrshAutoConfiguration {
@Override
@Override
protected
Iterable
<
PropertyDescriptor
<?>>
createConfigurationCapabilities
()
{
protected
Iterable
<
PropertyDescriptor
<?>>
createConfigurationCapabilities
()
{
return
Arrays
.<
PropertyDescriptor
<?>>
asList
(
ROLES
);
return
Arrays
.<
PropertyDescriptor
<?>>
asList
(
ROLES
);
}
}
}
}
...
@@ -458,7 +458,7 @@ public class CrshAutoConfiguration {
...
@@ -458,7 +458,7 @@ public class CrshAutoConfiguration {
return
Collections
.
singletonList
(((
FileHandle
)
handle
).
openStream
())
return
Collections
.
singletonList
(((
FileHandle
)
handle
).
openStream
())
.
iterator
();
.
iterator
();
}
}
return
Collections
.<
InputStream
>
emptyList
().
iterator
();
return
Collections
.<
InputStream
>
emptyList
().
iterator
();
}
}
@Override
@Override
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java
View file @
15686ed4
...
@@ -112,7 +112,7 @@ public class EndpointWebMvcChildContextConfiguration {
...
@@ -112,7 +112,7 @@ public class EndpointWebMvcChildContextConfiguration {
// the same place)
// the same place)
this
.
server
.
customize
(
container
);
this
.
server
.
customize
(
container
);
// Then reset the error pages
// Then reset the error pages
container
.
setErrorPages
(
Collections
.<
ErrorPage
>
emptySet
());
container
.
setErrorPages
(
Collections
.<
ErrorPage
>
emptySet
());
// and add the management-specific bits
// and add the management-specific bits
container
.
setPort
(
this
.
managementServerProperties
.
getPort
());
container
.
setPort
(
this
.
managementServerProperties
.
getPort
());
container
.
setAddress
(
this
.
managementServerProperties
.
getAddress
());
container
.
setAddress
(
this
.
managementServerProperties
.
getAddress
());
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpoint.java
View file @
15686ed4
...
@@ -184,7 +184,7 @@ public class ConfigurationPropertiesReportEndpoint extends
...
@@ -184,7 +184,7 @@ public class ConfigurationPropertiesReportEndpoint extends
return
result
;
return
result
;
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
return
new
HashMap
<
String
,
Object
>(
Collections
.<
String
,
Object
>
singletonMap
(
return
new
HashMap
<
String
,
Object
>(
Collections
.<
String
,
Object
>
singletonMap
(
"error"
,
"Cannot serialize '"
+
prefix
+
"'"
));
"error"
,
"Cannot serialize '"
+
prefix
+
"'"
));
}
}
}
}
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/ShutdownEndpoint.java
View file @
15686ed4
...
@@ -48,12 +48,12 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>> impl
...
@@ -48,12 +48,12 @@ public class ShutdownEndpoint extends AbstractEndpoint<Map<String, Object>> impl
public
Map
<
String
,
Object
>
invoke
()
{
public
Map
<
String
,
Object
>
invoke
()
{
if
(
this
.
context
==
null
)
{
if
(
this
.
context
==
null
)
{
return
Collections
.<
String
,
Object
>
singletonMap
(
"message"
,
return
Collections
.<
String
,
Object
>
singletonMap
(
"message"
,
"No context to shutdown."
);
"No context to shutdown."
);
}
}
try
{
try
{
return
Collections
.<
String
,
Object
>
singletonMap
(
"message"
,
return
Collections
.<
String
,
Object
>
singletonMap
(
"message"
,
"Shutting down, bye..."
);
"Shutting down, bye..."
);
}
}
finally
{
finally
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/listener/AuditListenerTests.java
View file @
15686ed4
...
@@ -36,7 +36,7 @@ public class AuditListenerTests {
...
@@ -36,7 +36,7 @@ public class AuditListenerTests {
public
void
testStoredEvents
()
{
public
void
testStoredEvents
()
{
AuditEventRepository
repository
=
mock
(
AuditEventRepository
.
class
);
AuditEventRepository
repository
=
mock
(
AuditEventRepository
.
class
);
AuditEvent
event
=
new
AuditEvent
(
"principal"
,
"type"
,
AuditEvent
event
=
new
AuditEvent
(
"principal"
,
"type"
,
Collections
.<
String
,
Object
>
emptyMap
());
Collections
.<
String
,
Object
>
emptyMap
());
AuditListener
listener
=
new
AuditListener
(
repository
);
AuditListener
listener
=
new
AuditListener
(
repository
);
listener
.
onApplicationEvent
(
new
AuditApplicationEvent
(
event
));
listener
.
onApplicationEvent
(
new
AuditApplicationEvent
(
event
));
verify
(
repository
).
add
(
event
);
verify
(
repository
).
add
(
event
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfigurationTests.java
View file @
15686ed4
...
@@ -171,7 +171,7 @@ public class EndpointAutoConfigurationTests {
...
@@ -171,7 +171,7 @@ public class EndpointAutoConfigurationTests {
@Override
@Override
public
Collection
<
Metric
<?>>
metrics
()
{
public
Collection
<
Metric
<?>>
metrics
()
{
Metric
<
Integer
>
metric
=
new
Metric
<
Integer
>(
"foo"
,
1
);
Metric
<
Integer
>
metric
=
new
Metric
<
Integer
>(
"foo"
,
1
);
return
Collections
.<
Metric
<?>>
singleton
(
metric
);
return
Collections
.<
Metric
<?>>
singleton
(
metric
);
}
}
};
};
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/AbstractEndpointTests.java
View file @
15686ed4
...
@@ -97,7 +97,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
...
@@ -97,7 +97,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public
void
isSensitiveOverride
()
throws
Exception
{
public
void
isSensitiveOverride
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
Collections
.<
String
,
Object
>
singletonMap
(
this
.
property
+
".sensitive"
,
Collections
.<
String
,
Object
>
singletonMap
(
this
.
property
+
".sensitive"
,
String
.
valueOf
(!
this
.
sensitive
)));
String
.
valueOf
(!
this
.
sensitive
)));
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
register
(
this
.
configClass
);
this
.
context
.
register
(
this
.
configClass
);
...
@@ -114,7 +114,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
...
@@ -114,7 +114,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public
void
isEnabledFallbackToEnvironment
()
throws
Exception
{
public
void
isEnabledFallbackToEnvironment
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
Collections
.<
String
,
Object
>
singletonMap
(
this
.
property
+
".enabled"
,
Collections
.<
String
,
Object
>
singletonMap
(
this
.
property
+
".enabled"
,
false
));
false
));
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
register
(
this
.
configClass
);
this
.
context
.
register
(
this
.
configClass
);
...
@@ -127,7 +127,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
...
@@ -127,7 +127,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public
void
isExplicitlyEnabled
()
throws
Exception
{
public
void
isExplicitlyEnabled
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
Collections
.<
String
,
Object
>
singletonMap
(
this
.
property
+
".enabled"
,
Collections
.<
String
,
Object
>
singletonMap
(
this
.
property
+
".enabled"
,
false
));
false
));
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
register
(
this
.
configClass
);
this
.
context
.
register
(
this
.
configClass
);
...
@@ -140,7 +140,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
...
@@ -140,7 +140,7 @@ public abstract class AbstractEndpointTests<T extends Endpoint<?>> {
public
void
isAllEndpointsDisabled
()
throws
Exception
{
public
void
isAllEndpointsDisabled
()
throws
Exception
{
this
.
context
=
new
AnnotationConfigApplicationContext
();
this
.
context
=
new
AnnotationConfigApplicationContext
();
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
PropertySource
<?>
propertySource
=
new
MapPropertySource
(
"test"
,
Collections
.<
String
,
Object
>
singletonMap
(
"endpoints.enabled"
,
false
));
Collections
.<
String
,
Object
>
singletonMap
(
"endpoints.enabled"
,
false
));
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
getEnvironment
().
getPropertySources
().
addFirst
(
propertySource
);
this
.
context
.
register
(
this
.
configClass
);
this
.
context
.
register
(
this
.
configClass
);
this
.
context
.
refresh
();
this
.
context
.
refresh
();
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/MetricsEndpointTests.java
View file @
15686ed4
...
@@ -106,7 +106,7 @@ public class MetricsEndpointTests extends AbstractEndpointTests<MetricsEndpoint>
...
@@ -106,7 +106,7 @@ public class MetricsEndpointTests extends AbstractEndpointTests<MetricsEndpoint>
PublicMetrics
metrics
=
new
PublicMetrics
()
{
PublicMetrics
metrics
=
new
PublicMetrics
()
{
@Override
@Override
public
Collection
<
Metric
<?>>
metrics
()
{
public
Collection
<
Metric
<?>>
metrics
()
{
return
Collections
.<
Metric
<?>>
singleton
(
metric
);
return
Collections
.<
Metric
<?>>
singleton
(
metric
);
}
}
};
};
return
new
MetricsEndpoint
(
metrics
);
return
new
MetricsEndpoint
(
metrics
);
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/RequestMappingEndpointTests.java
View file @
15686ed4
...
@@ -53,7 +53,7 @@ public class RequestMappingEndpointTests {
...
@@ -53,7 +53,7 @@ public class RequestMappingEndpointTests {
mapping
.
setApplicationContext
(
new
StaticApplicationContext
());
mapping
.
setApplicationContext
(
new
StaticApplicationContext
());
mapping
.
initApplicationContext
();
mapping
.
initApplicationContext
();
this
.
endpoint
.
setHandlerMappings
(
Collections
this
.
endpoint
.
setHandlerMappings
(
Collections
.<
AbstractUrlHandlerMapping
>
singletonList
(
mapping
));
.<
AbstractUrlHandlerMapping
>
singletonList
(
mapping
));
Map
<
String
,
Object
>
result
=
this
.
endpoint
.
invoke
();
Map
<
String
,
Object
>
result
=
this
.
endpoint
.
invoke
();
assertEquals
(
1
,
result
.
size
());
assertEquals
(
1
,
result
.
size
());
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
...
@@ -114,7 +114,7 @@ public class RequestMappingEndpointTests {
...
@@ -114,7 +114,7 @@ public class RequestMappingEndpointTests {
mapping
.
setApplicationContext
(
new
StaticApplicationContext
());
mapping
.
setApplicationContext
(
new
StaticApplicationContext
());
mapping
.
afterPropertiesSet
();
mapping
.
afterPropertiesSet
();
this
.
endpoint
.
setMethodMappings
(
Collections
this
.
endpoint
.
setMethodMappings
(
Collections
.<
AbstractHandlerMethodMapping
<?>>
singletonList
(
mapping
));
.<
AbstractHandlerMethodMapping
<?>>
singletonList
(
mapping
));
Map
<
String
,
Object
>
result
=
this
.
endpoint
.
invoke
();
Map
<
String
,
Object
>
result
=
this
.
endpoint
.
invoke
();
assertEquals
(
1
,
result
.
size
());
assertEquals
(
1
,
result
.
size
());
assertTrue
(
result
.
keySet
().
iterator
().
next
().
contains
(
"/dump"
));
assertTrue
(
result
.
keySet
().
iterator
().
next
().
contains
(
"/dump"
));
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/TraceEndpointTests.java
View file @
15686ed4
...
@@ -53,7 +53,7 @@ public class TraceEndpointTests extends AbstractEndpointTests<TraceEndpoint> {
...
@@ -53,7 +53,7 @@ public class TraceEndpointTests extends AbstractEndpointTests<TraceEndpoint> {
@Bean
@Bean
public
TraceEndpoint
endpoint
()
{
public
TraceEndpoint
endpoint
()
{
TraceRepository
repository
=
new
InMemoryTraceRepository
();
TraceRepository
repository
=
new
InMemoryTraceRepository
();
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"a"
,
"b"
));
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"a"
,
"b"
));
return
new
TraceEndpoint
(
repository
);
return
new
TraceEndpoint
(
repository
);
}
}
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/HealthMvcEndpointTests.java
View file @
15686ed4
...
@@ -49,7 +49,7 @@ import static org.mockito.Mockito.mock;
...
@@ -49,7 +49,7 @@ import static org.mockito.Mockito.mock;
public
class
HealthMvcEndpointTests
{
public
class
HealthMvcEndpointTests
{
private
static
final
PropertySource
<?>
NON_SENSITIVE
=
new
MapPropertySource
(
"test"
,
private
static
final
PropertySource
<?>
NON_SENSITIVE
=
new
MapPropertySource
(
"test"
,
Collections
.<
String
,
Object
>
singletonMap
(
"endpoints.health.sensitive"
,
Collections
.<
String
,
Object
>
singletonMap
(
"endpoints.health.sensitive"
,
"false"
));
"false"
));
private
HealthEndpoint
endpoint
=
null
;
private
HealthEndpoint
endpoint
=
null
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/mvc/MetricsMvcEndpointTests.java
View file @
15686ed4
...
@@ -108,7 +108,7 @@ public class MetricsMvcEndpointTests {
...
@@ -108,7 +108,7 @@ public class MetricsMvcEndpointTests {
@Override
@Override
public
Collection
<
Metric
<?>>
metrics
()
{
public
Collection
<
Metric
<?>>
metrics
()
{
return
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Integer
>(
"foo"
,
1
));
return
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Integer
>(
"foo"
,
1
));
}
}
});
});
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/PrefixMetricGroupExporterTests.java
View file @
15686ed4
...
@@ -60,7 +60,7 @@ public class PrefixMetricGroupExporterTests {
...
@@ -60,7 +60,7 @@ public class PrefixMetricGroupExporterTests {
@Test
@Test
public
void
multiMetricGroupsCopiedAsDefault
()
{
public
void
multiMetricGroupsCopiedAsDefault
()
{
this
.
reader
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"bar"
,
2.3
),
this
.
reader
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"bar"
,
2.3
),
new
Metric
<
Number
>(
"spam"
,
1.3
)));
new
Metric
<
Number
>(
"spam"
,
1.3
)));
this
.
exporter
.
export
();
this
.
exporter
.
export
();
assertEquals
(
1
,
this
.
writer
.
countGroups
());
assertEquals
(
1
,
this
.
writer
.
countGroups
());
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/repository/redis/RedisMultiMetricRepositoryTests.java
View file @
15686ed4
...
@@ -55,7 +55,7 @@ public class RedisMultiMetricRepositoryTests {
...
@@ -55,7 +55,7 @@ public class RedisMultiMetricRepositoryTests {
@Parameters
@Parameters
public
static
List
<
Object
[]>
parameters
()
{
public
static
List
<
Object
[]>
parameters
()
{
return
Arrays
.<
Object
[]>
asList
(
new
Object
[]
{
null
},
new
Object
[]
{
"test"
});
return
Arrays
.<
Object
[]>
asList
(
new
Object
[]
{
null
},
new
Object
[]
{
"test"
});
}
}
@Before
@Before
...
@@ -85,26 +85,26 @@ public class RedisMultiMetricRepositoryTests {
...
@@ -85,26 +85,26 @@ public class RedisMultiMetricRepositoryTests {
@Test
@Test
public
void
setAndGet
()
{
public
void
setAndGet
()
{
this
.
repository
.
set
(
"foo"
,
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.bar"
,
12.3
)));
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.bar"
,
12.3
)));
this
.
repository
.
set
(
"foo"
,
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.bar"
,
15.3
)));
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.bar"
,
15.3
)));
assertEquals
(
15.3
,
Iterables
.
collection
(
this
.
repository
.
findAll
(
"foo"
))
assertEquals
(
15.3
,
Iterables
.
collection
(
this
.
repository
.
findAll
(
"foo"
))
.
iterator
().
next
().
getValue
());
.
iterator
().
next
().
getValue
());
}
}
@Test
@Test
public
void
setAndGetMultiple
()
{
public
void
setAndGetMultiple
()
{
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.val"
,
"foo.val"
,
12.3
),
new
Metric
<
Number
>(
"foo.bar"
,
11.3
)));
12.3
),
new
Metric
<
Number
>(
"foo.bar"
,
11.3
)));
assertEquals
(
2
,
Iterables
.
collection
(
this
.
repository
.
findAll
(
"foo"
)).
size
());
assertEquals
(
2
,
Iterables
.
collection
(
this
.
repository
.
findAll
(
"foo"
)).
size
());
}
}
@Test
@Test
public
void
groups
()
{
public
void
groups
()
{
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.val"
,
"foo.val"
,
12.3
),
new
Metric
<
Number
>(
"foo.bar"
,
11.3
)));
12.3
),
new
Metric
<
Number
>(
"foo.bar"
,
11.3
)));
this
.
repository
.
set
(
"bar"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
this
.
repository
.
set
(
"bar"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"bar.val"
,
"bar.val"
,
12.3
),
new
Metric
<
Number
>(
"bar.foo"
,
11.3
)));
12.3
),
new
Metric
<
Number
>(
"bar.foo"
,
11.3
)));
Collection
<
String
>
groups
=
Iterables
.
collection
(
this
.
repository
.
groups
());
Collection
<
String
>
groups
=
Iterables
.
collection
(
this
.
repository
.
groups
());
assertEquals
(
2
,
groups
.
size
());
assertEquals
(
2
,
groups
.
size
());
assertTrue
(
"Wrong groups: "
+
groups
,
groups
.
contains
(
"foo"
));
assertTrue
(
"Wrong groups: "
+
groups
,
groups
.
contains
(
"foo"
));
...
@@ -112,10 +112,10 @@ public class RedisMultiMetricRepositoryTests {
...
@@ -112,10 +112,10 @@ public class RedisMultiMetricRepositoryTests {
@Test
@Test
public
void
count
()
{
public
void
count
()
{
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
this
.
repository
.
set
(
"foo"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"foo.val"
,
"foo.val"
,
12.3
),
new
Metric
<
Number
>(
"foo.bar"
,
11.3
)));
12.3
),
new
Metric
<
Number
>(
"foo.bar"
,
11.3
)));
this
.
repository
.
set
(
"bar"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
this
.
repository
.
set
(
"bar"
,
Arrays
.<
Metric
<?>>
asList
(
new
Metric
<
Number
>(
"bar.val"
,
"bar.val"
,
12.3
),
new
Metric
<
Number
>(
"bar.foo"
,
11.3
)));
12.3
),
new
Metric
<
Number
>(
"bar.foo"
,
11.3
)));
assertEquals
(
2
,
this
.
repository
.
countGroups
());
assertEquals
(
2
,
this
.
repository
.
countGroups
());
}
}
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/writer/DropwizardMetricWriterTests.java
View file @
15686ed4
...
@@ -36,7 +36,8 @@ import static org.junit.Assert.assertFalse;
...
@@ -36,7 +36,8 @@ import static org.junit.Assert.assertFalse;
public
class
DropwizardMetricWriterTests
{
public
class
DropwizardMetricWriterTests
{
private
final
MetricRegistry
registry
=
new
MetricRegistry
();
private
final
MetricRegistry
registry
=
new
MetricRegistry
();
private
final
DropwizardMetricWriter
writer
=
new
DropwizardMetricWriter
(
this
.
registry
);
private
final
DropwizardMetricWriter
writer
=
new
DropwizardMetricWriter
(
this
.
registry
);
@Test
@Test
public
void
incrementCounter
()
{
public
void
incrementCounter
()
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthorizationAuditListenerTests.java
View file @
15686ed4
...
@@ -49,7 +49,7 @@ public class AuthorizationAuditListenerTests {
...
@@ -49,7 +49,7 @@ public class AuthorizationAuditListenerTests {
@Test
@Test
public
void
testAuthenticationSuccess
()
{
public
void
testAuthenticationSuccess
()
{
this
.
listener
.
onApplicationEvent
(
new
AuthorizationFailureEvent
(
this
,
Arrays
this
.
listener
.
onApplicationEvent
(
new
AuthorizationFailureEvent
(
this
,
Arrays
.<
ConfigAttribute
>
asList
(
new
SecurityConfig
(
"USER"
)),
.<
ConfigAttribute
>
asList
(
new
SecurityConfig
(
"USER"
)),
new
UsernamePasswordAuthenticationToken
(
"user"
,
"password"
),
new
UsernamePasswordAuthenticationToken
(
"user"
,
"password"
),
new
AccessDeniedException
(
"Bad user"
)));
new
AccessDeniedException
(
"Bad user"
)));
verify
(
this
.
publisher
).
publishEvent
((
ApplicationEvent
)
anyObject
());
verify
(
this
.
publisher
).
publishEvent
((
ApplicationEvent
)
anyObject
());
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/InMemoryTraceRepositoryTests.java
View file @
15686ed4
...
@@ -35,9 +35,9 @@ public class InMemoryTraceRepositoryTests {
...
@@ -35,9 +35,9 @@ public class InMemoryTraceRepositoryTests {
@Test
@Test
public
void
capacityLimited
()
{
public
void
capacityLimited
()
{
this
.
repository
.
setCapacity
(
2
);
this
.
repository
.
setCapacity
(
2
);
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"foo"
,
"bar"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"foo"
,
"bar"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"foo"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"foo"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"bar"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"bar"
));
List
<
Trace
>
traces
=
this
.
repository
.
findAll
();
List
<
Trace
>
traces
=
this
.
repository
.
findAll
();
assertEquals
(
2
,
traces
.
size
());
assertEquals
(
2
,
traces
.
size
());
assertEquals
(
"bar"
,
traces
.
get
(
0
).
getInfo
().
get
(
"bar"
));
assertEquals
(
"bar"
,
traces
.
get
(
0
).
getInfo
().
get
(
"bar"
));
...
@@ -48,9 +48,9 @@ public class InMemoryTraceRepositoryTests {
...
@@ -48,9 +48,9 @@ public class InMemoryTraceRepositoryTests {
public
void
reverseFalse
()
{
public
void
reverseFalse
()
{
this
.
repository
.
setReverse
(
false
);
this
.
repository
.
setReverse
(
false
);
this
.
repository
.
setCapacity
(
2
);
this
.
repository
.
setCapacity
(
2
);
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"foo"
,
"bar"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"foo"
,
"bar"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"foo"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"foo"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"bar"
));
this
.
repository
.
add
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"bar"
));
List
<
Trace
>
traces
=
this
.
repository
.
findAll
();
List
<
Trace
>
traces
=
this
.
repository
.
findAll
();
assertEquals
(
2
,
traces
.
size
());
assertEquals
(
2
,
traces
.
size
());
assertEquals
(
"bar"
,
traces
.
get
(
1
).
getInfo
().
get
(
"bar"
));
assertEquals
(
"bar"
,
traces
.
get
(
1
).
getInfo
().
get
(
"bar"
));
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jackson/JacksonProperties.java
View file @
15686ed4
...
@@ -45,8 +45,7 @@ public class JacksonProperties {
...
@@ -45,8 +45,7 @@ public class JacksonProperties {
/**
/**
* Joda date time format string (yyyy-MM-dd HH:mm:ss). If not configured,
* Joda date time format string (yyyy-MM-dd HH:mm:ss). If not configured,
* "date-format" will be used as a fallback if it is configured with a format
* "date-format" will be used as a fallback if it is configured with a format string.
* string.
*/
*/
private
String
jodaDateTimeFormat
;
private
String
jodaDateTimeFormat
;
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DatabaseDriver.java
View file @
15686ed4
...
@@ -86,7 +86,8 @@ enum DatabaseDriver {
...
@@ -86,7 +86,8 @@ enum DatabaseDriver {
/**
/**
* SQL Server
* SQL Server
*/
*/
SQLSERVER
(
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
,
"com.microsoft.sqlserver.jdbc.SQLServerXADataSource"
);
SQLSERVER
(
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
,
"com.microsoft.sqlserver.jdbc.SQLServerXADataSource"
);
private
final
String
driverClassName
;
private
final
String
driverClassName
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jndi/JndiPropertiesHidingClassLoader.java
View file @
15686ed4
...
@@ -36,7 +36,7 @@ public class JndiPropertiesHidingClassLoader extends ClassLoader {
...
@@ -36,7 +36,7 @@ public class JndiPropertiesHidingClassLoader extends ClassLoader {
@Override
@Override
public
Enumeration
<
URL
>
getResources
(
String
name
)
throws
IOException
{
public
Enumeration
<
URL
>
getResources
(
String
name
)
throws
IOException
{
if
(
"jndi.properties"
.
equals
(
name
))
{
if
(
"jndi.properties"
.
equals
(
name
))
{
return
Collections
.
enumeration
(
Collections
.<
URL
>
emptyList
());
return
Collections
.
enumeration
(
Collections
.<
URL
>
emptyList
());
}
}
return
super
.
getResources
(
name
);
return
super
.
getResources
(
name
);
}
}
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoDataAutoConfigurationTests.java
View file @
15686ed4
...
@@ -109,7 +109,7 @@ public class MongoDataAutoConfigurationTests {
...
@@ -109,7 +109,7 @@ public class MongoDataAutoConfigurationTests {
Set
<
Class
>
initialEntitySet
=
(
Set
<
Class
>)
ReflectionTestUtils
.
getField
(
Set
<
Class
>
initialEntitySet
=
(
Set
<
Class
>)
ReflectionTestUtils
.
getField
(
mappingContext
,
"initialEntitySet"
);
mappingContext
,
"initialEntitySet"
);
assertThat
(
initialEntitySet
,
hasSize
(
types
.
length
));
assertThat
(
initialEntitySet
,
hasSize
(
types
.
length
));
assertThat
(
initialEntitySet
,
Matchers
.<
Class
>
hasItems
(
types
));
assertThat
(
initialEntitySet
,
Matchers
.<
Class
>
hasItems
(
types
));
}
}
@Configuration
@Configuration
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/HttpMessageConvertersTests.java
View file @
15686ed4
...
@@ -58,7 +58,7 @@ public class HttpMessageConvertersTests {
...
@@ -58,7 +58,7 @@ public class HttpMessageConvertersTests {
for
(
HttpMessageConverter
<?>
converter
:
converters
)
{
for
(
HttpMessageConverter
<?>
converter
:
converters
)
{
converterClasses
.
add
(
converter
.
getClass
());
converterClasses
.
add
(
converter
.
getClass
());
}
}
assertThat
(
converterClasses
,
equalTo
(
Arrays
.<
Class
<?>>
asList
(
assertThat
(
converterClasses
,
equalTo
(
Arrays
.<
Class
<?>>
asList
(
ByteArrayHttpMessageConverter
.
class
,
StringHttpMessageConverter
.
class
,
ByteArrayHttpMessageConverter
.
class
,
StringHttpMessageConverter
.
class
,
ResourceHttpMessageConverter
.
class
,
SourceHttpMessageConverter
.
class
,
ResourceHttpMessageConverter
.
class
,
SourceHttpMessageConverter
.
class
,
AllEncompassingFormHttpMessageConverter
.
class
,
AllEncompassingFormHttpMessageConverter
.
class
,
...
@@ -117,7 +117,7 @@ public class HttpMessageConvertersTests {
...
@@ -117,7 +117,7 @@ public class HttpMessageConvertersTests {
for
(
HttpMessageConverter
<?>
converter
:
converters
)
{
for
(
HttpMessageConverter
<?>
converter
:
converters
)
{
converterClasses
.
add
(
converter
.
getClass
());
converterClasses
.
add
(
converter
.
getClass
());
}
}
assertThat
(
converterClasses
,
equalTo
(
Arrays
.<
Class
<?>>
asList
(
assertThat
(
converterClasses
,
equalTo
(
Arrays
.<
Class
<?>>
asList
(
ByteArrayHttpMessageConverter
.
class
,
StringHttpMessageConverter
.
class
,
ByteArrayHttpMessageConverter
.
class
,
StringHttpMessageConverter
.
class
,
ResourceHttpMessageConverter
.
class
,
SourceHttpMessageConverter
.
class
,
ResourceHttpMessageConverter
.
class
,
SourceHttpMessageConverter
.
class
,
AllEncompassingFormHttpMessageConverter
.
class
,
AllEncompassingFormHttpMessageConverter
.
class
,
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/DefaultCommandFactory.java
View file @
15686ed4
...
@@ -38,7 +38,7 @@ import org.springframework.boot.cli.command.test.TestCommand;
...
@@ -38,7 +38,7 @@ import org.springframework.boot.cli.command.test.TestCommand;
*/
*/
public
class
DefaultCommandFactory
implements
CommandFactory
{
public
class
DefaultCommandFactory
implements
CommandFactory
{
private
static
final
List
<
Command
>
DEFAULT_COMMANDS
=
Arrays
.<
Command
>
asList
(
private
static
final
List
<
Command
>
DEFAULT_COMMANDS
=
Arrays
.<
Command
>
asList
(
new
VersionCommand
(),
new
RunCommand
(),
new
TestCommand
(),
new
GrabCommand
(),
new
VersionCommand
(),
new
RunCommand
(),
new
TestCommand
(),
new
GrabCommand
(),
new
JarCommand
(),
new
InstallCommand
(),
new
UninstallCommand
(),
new
JarCommand
(),
new
InstallCommand
(),
new
UninstallCommand
(),
new
InitCommand
());
new
InitCommand
());
...
...
spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java
View file @
15686ed4
...
@@ -39,7 +39,7 @@ public abstract class GroovyTemplate {
...
@@ -39,7 +39,7 @@ public abstract class GroovyTemplate {
public
static
String
template
(
String
name
)
throws
IOException
,
public
static
String
template
(
String
name
)
throws
IOException
,
CompilationFailedException
,
ClassNotFoundException
{
CompilationFailedException
,
ClassNotFoundException
{
return
template
(
name
,
Collections
.<
String
,
Object
>
emptyMap
());
return
template
(
name
,
Collections
.<
String
,
Object
>
emptyMap
());
}
}
public
static
String
template
(
String
name
,
Map
<
String
,
?>
model
)
throws
IOException
,
public
static
String
template
(
String
name
,
Map
<
String
,
?>
model
)
throws
IOException
,
...
...
spring-boot-cli/src/test/java/cli/command/CustomCommandFactory.java
View file @
15686ed4
...
@@ -29,7 +29,7 @@ public class CustomCommandFactory implements CommandFactory {
...
@@ -29,7 +29,7 @@ public class CustomCommandFactory implements CommandFactory {
@Override
@Override
public
Collection
<
Command
>
getCommands
()
{
public
Collection
<
Command
>
getCommands
()
{
return
Collections
.<
Command
>
singleton
(
new
CustomCommand
());
return
Collections
.<
Command
>
singleton
(
new
CustomCommand
());
}
}
}
}
spring-boot-cli/src/test/java/org/springframework/boot/cli/CliTester.java
View file @
15686ed4
...
@@ -81,7 +81,8 @@ public class CliTester implements TestRule {
...
@@ -81,7 +81,8 @@ public class CliTester implements TestRule {
try
{
try
{
this
.
commands
.
add
(
future
.
get
(
this
.
timeout
,
TimeUnit
.
MILLISECONDS
));
this
.
commands
.
add
(
future
.
get
(
this
.
timeout
,
TimeUnit
.
MILLISECONDS
));
return
getOutput
();
return
getOutput
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
return
getOutput
();
return
getOutput
();
}
}
}
}
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/ProjectGenerationRequestTests.java
View file @
15686ed4
...
@@ -41,7 +41,7 @@ import static org.junit.Assert.assertEquals;
...
@@ -41,7 +41,7 @@ import static org.junit.Assert.assertEquals;
public
class
ProjectGenerationRequestTests
{
public
class
ProjectGenerationRequestTests
{
public
static
final
Map
<
String
,
String
>
EMPTY_TAGS
=
Collections
public
static
final
Map
<
String
,
String
>
EMPTY_TAGS
=
Collections
.<
String
,
String
>
emptyMap
();
.<
String
,
String
>
emptyMap
();
@Rule
@Rule
public
final
ExpectedException
thrown
=
ExpectedException
.
none
();
public
final
ExpectedException
thrown
=
ExpectedException
.
none
();
...
...
spring-boot-samples/spring-boot-sample-atmosphere/src/main/java/sample/SampleAtmosphereApplication.java
View file @
15686ed4
...
@@ -72,7 +72,7 @@ public class SampleAtmosphereApplication {
...
@@ -72,7 +72,7 @@ public class SampleAtmosphereApplication {
@Override
@Override
public
void
onStartup
(
ServletContext
servletContext
)
throws
ServletException
{
public
void
onStartup
(
ServletContext
servletContext
)
throws
ServletException
{
onStartup
(
Collections
.<
Class
<?>>
emptySet
(),
servletContext
);
onStartup
(
Collections
.<
Class
<?>>
emptySet
(),
servletContext
);
}
}
}
}
...
...
spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/fieldvalues/FieldValuesParser.java
View file @
15686ed4
...
@@ -33,8 +33,7 @@ import org.springframework.boot.configurationprocessor.fieldvalues.javac.JavaCom
...
@@ -33,8 +33,7 @@ import org.springframework.boot.configurationprocessor.fieldvalues.javac.JavaCom
public
interface
FieldValuesParser
{
public
interface
FieldValuesParser
{
/**
/**
* Implementation of {@link FieldValuesParser} that always returns an empty
* Implementation of {@link FieldValuesParser} that always returns an empty result.
* result.
*/
*/
public
static
final
FieldValuesParser
NONE
=
new
FieldValuesParser
()
{
public
static
final
FieldValuesParser
NONE
=
new
FieldValuesParser
()
{
...
...
spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/simple/NotAnnotated.java
View file @
15686ed4
...
@@ -16,7 +16,6 @@
...
@@ -16,7 +16,6 @@
package
org
.
springframework
.
boot
.
configurationsample
.
simple
;
package
org
.
springframework
.
boot
.
configurationsample
.
simple
;
/**
/**
* This has no annotation on purpose to check that no meta-data is generated.
* This has no annotation on purpose to check that no meta-data is generated.
*
*
...
...
spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/Dependency.java
View file @
15686ed4
...
@@ -42,7 +42,7 @@ public final class Dependency {
...
@@ -42,7 +42,7 @@ public final class Dependency {
* @param version the version
* @param version the version
*/
*/
public
Dependency
(
String
groupId
,
String
artifactId
,
String
version
)
{
public
Dependency
(
String
groupId
,
String
artifactId
,
String
version
)
{
this
(
groupId
,
artifactId
,
version
,
Collections
.<
Exclusion
>
emptyList
());
this
(
groupId
,
artifactId
,
version
,
Collections
.<
Exclusion
>
emptyList
());
}
}
/**
/**
...
...
spring-boot-tools/spring-boot-dependency-tools/src/main/java/org/springframework/boot/dependency/tools/ManagedDependencies.java
View file @
15686ed4
...
@@ -93,7 +93,7 @@ public abstract class ManagedDependencies implements Dependencies {
...
@@ -93,7 +93,7 @@ public abstract class ManagedDependencies implements Dependencies {
* @see #get(Collection)
* @see #get(Collection)
*/
*/
public
static
ManagedDependencies
get
()
{
public
static
ManagedDependencies
get
()
{
return
get
(
Collections
.<
Dependencies
>
emptySet
());
return
get
(
Collections
.<
Dependencies
>
emptySet
());
}
}
/**
/**
...
...
spring-boot-tools/spring-boot-dependency-tools/src/test/java/org/springframework/boot/dependency/tools/ManagedDependenciesDelegateTests.java
View file @
15686ed4
...
@@ -41,7 +41,7 @@ public class ManagedDependenciesDelegateTests {
...
@@ -41,7 +41,7 @@ public class ManagedDependenciesDelegateTests {
PropertiesFileDependencies
extra
=
new
PropertiesFileDependencies
(
getClass
()
PropertiesFileDependencies
extra
=
new
PropertiesFileDependencies
(
getClass
()
.
getResourceAsStream
(
"additional-external.properties"
));
.
getResourceAsStream
(
"additional-external.properties"
));
this
.
dependencies
=
new
ManagedDependenciesDelegate
(
root
,
this
.
dependencies
=
new
ManagedDependenciesDelegate
(
root
,
Collections
.<
Dependencies
>
singleton
(
extra
));
Collections
.<
Dependencies
>
singleton
(
extra
));
}
}
@Test
@Test
...
...
spring-boot-tools/spring-boot-loader/src/test/java/org/springframework/boot/loader/PropertiesLauncherTests.java
View file @
15686ed4
...
@@ -138,8 +138,7 @@ public class PropertiesLauncherTests {
...
@@ -138,8 +138,7 @@ public class PropertiesLauncherTests {
public
void
testCustomClassLoaderCreation
()
throws
Exception
{
public
void
testCustomClassLoaderCreation
()
throws
Exception
{
System
.
setProperty
(
"loader.classLoader"
,
TestLoader
.
class
.
getName
());
System
.
setProperty
(
"loader.classLoader"
,
TestLoader
.
class
.
getName
());
PropertiesLauncher
launcher
=
new
PropertiesLauncher
();
PropertiesLauncher
launcher
=
new
PropertiesLauncher
();
ClassLoader
loader
=
launcher
ClassLoader
loader
=
launcher
.
createClassLoader
(
Collections
.<
Archive
>
emptyList
());
.
createClassLoader
(
Collections
.<
Archive
>
emptyList
());
assertNotNull
(
loader
);
assertNotNull
(
loader
);
assertEquals
(
TestLoader
.
class
.
getName
(),
loader
.
getClass
().
getName
());
assertEquals
(
TestLoader
.
class
.
getName
(),
loader
.
getClass
().
getName
());
}
}
...
...
spring-boot-tools/spring-boot-maven-plugin/src/test/java/org/springframework/boot/maven/DependencyFilterMojoTests.java
View file @
15686ed4
...
@@ -42,7 +42,7 @@ public class DependencyFilterMojoTests {
...
@@ -42,7 +42,7 @@ public class DependencyFilterMojoTests {
@Test
@Test
public
void
filterDependencies
()
throws
MojoExecutionException
{
public
void
filterDependencies
()
throws
MojoExecutionException
{
TestableDependencyFilterMojo
mojo
=
new
TestableDependencyFilterMojo
(
TestableDependencyFilterMojo
mojo
=
new
TestableDependencyFilterMojo
(
Collections
.<
Exclude
>
emptyList
(),
"com.foo"
,
"exclude-id"
);
Collections
.<
Exclude
>
emptyList
(),
"com.foo"
,
"exclude-id"
);
Artifact
artifact
=
createArtifact
(
"com.bar"
,
"one"
);
Artifact
artifact
=
createArtifact
(
"com.bar"
,
"one"
);
Set
<
Artifact
>
artifacts
=
mojo
.
filterDependencies
(
Set
<
Artifact
>
artifacts
=
mojo
.
filterDependencies
(
...
@@ -55,7 +55,7 @@ public class DependencyFilterMojoTests {
...
@@ -55,7 +55,7 @@ public class DependencyFilterMojoTests {
@Test
@Test
public
void
filterGroupIdExactMatch
()
throws
MojoExecutionException
{
public
void
filterGroupIdExactMatch
()
throws
MojoExecutionException
{
TestableDependencyFilterMojo
mojo
=
new
TestableDependencyFilterMojo
(
TestableDependencyFilterMojo
mojo
=
new
TestableDependencyFilterMojo
(
Collections
.<
Exclude
>
emptyList
(),
"com.foo"
,
""
);
Collections
.<
Exclude
>
emptyList
(),
"com.foo"
,
""
);
Artifact
artifact
=
createArtifact
(
"com.foo.bar"
,
"one"
);
Artifact
artifact
=
createArtifact
(
"com.foo.bar"
,
"one"
);
Set
<
Artifact
>
artifacts
=
mojo
.
filterDependencies
(
Set
<
Artifact
>
artifacts
=
mojo
.
filterDependencies
(
...
...
spring-boot/src/main/java/org/springframework/boot/jta/atomikos/AtomikosDependsOnBeanFactoryPostProcessor.java
View file @
15686ed4
...
@@ -101,7 +101,7 @@ public class AtomikosDependsOnBeanFactoryPostProcessor implements
...
@@ -101,7 +101,7 @@ public class AtomikosDependsOnBeanFactoryPostProcessor implements
}
}
private
List
<
String
>
asList
(
String
[]
array
)
{
private
List
<
String
>
asList
(
String
[]
array
)
{
return
(
array
==
null
?
Collections
.<
String
>
emptyList
()
:
Arrays
.
asList
(
array
));
return
(
array
==
null
?
Collections
.<
String
>
emptyList
()
:
Arrays
.
asList
(
array
));
}
}
@Override
@Override
...
...
spring-boot/src/main/java/org/springframework/boot/test/TestRestTemplate.java
View file @
15686ed4
...
@@ -85,7 +85,7 @@ public class TestRestTemplate extends RestTemplate {
...
@@ -85,7 +85,7 @@ public class TestRestTemplate extends RestTemplate {
return
;
return
;
}
}
List
<
ClientHttpRequestInterceptor
>
interceptors
=
Collections
List
<
ClientHttpRequestInterceptor
>
interceptors
=
Collections
.<
ClientHttpRequestInterceptor
>
singletonList
(
new
BasicAuthorizationInterceptor
(
.<
ClientHttpRequestInterceptor
>
singletonList
(
new
BasicAuthorizationInterceptor
(
username
,
password
));
username
,
password
));
setRequestFactory
(
new
InterceptingClientHttpRequestFactory
(
getRequestFactory
(),
setRequestFactory
(
new
InterceptingClientHttpRequestFactory
(
getRequestFactory
(),
interceptors
));
interceptors
));
...
...
spring-boot/src/test/java/org/springframework/boot/ResourceBannerTests.java
View file @
15686ed4
...
@@ -77,7 +77,7 @@ public class ResourceBannerTests {
...
@@ -77,7 +77,7 @@ public class ResourceBannerTests {
ResourceBanner
banner
=
new
MockResourceBanner
(
resource
,
bootVersion
,
ResourceBanner
banner
=
new
MockResourceBanner
(
resource
,
bootVersion
,
applicationVersion
);
applicationVersion
);
ConfigurableEnvironment
environment
=
new
MockEnvironment
();
ConfigurableEnvironment
environment
=
new
MockEnvironment
();
Map
<
String
,
Object
>
source
=
Collections
.<
String
,
Object
>
singletonMap
(
"a"
,
"1"
);
Map
<
String
,
Object
>
source
=
Collections
.<
String
,
Object
>
singletonMap
(
"a"
,
"1"
);
environment
.
getPropertySources
().
addLast
(
new
MapPropertySource
(
"map"
,
source
));
environment
.
getPropertySources
().
addLast
(
new
MapPropertySource
(
"map"
,
source
));
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
banner
.
printBanner
(
environment
,
getClass
(),
new
PrintStream
(
out
));
banner
.
printBanner
(
environment
,
getClass
(),
new
PrintStream
(
out
));
...
...
spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
View file @
15686ed4
...
@@ -314,7 +314,7 @@ public class SpringApplicationTests {
...
@@ -314,7 +314,7 @@ public class SpringApplicationTests {
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
ConfigurableEnvironment
environment
=
new
StandardEnvironment
();
environment
.
getPropertySources
().
addFirst
(
environment
.
getPropertySources
().
addFirst
(
new
MapPropertySource
(
"commandLineArgs"
,
Collections
new
MapPropertySource
(
"commandLineArgs"
,
Collections
.<
String
,
Object
>
singletonMap
(
"foo"
,
"original"
)));
.<
String
,
Object
>
singletonMap
(
"foo"
,
"original"
)));
application
.
setEnvironment
(
environment
);
application
.
setEnvironment
(
environment
);
application
.
run
(
"--foo=bar"
,
"--bar=foo"
);
application
.
run
(
"--foo=bar"
,
"--bar=foo"
);
assertTrue
(
hasPropertySource
(
environment
,
CompositePropertySource
.
class
,
assertTrue
(
hasPropertySource
(
environment
,
CompositePropertySource
.
class
,
...
...
spring-boot/src/test/java/org/springframework/boot/bind/PropertySourcesPropertyValuesTests.java
View file @
15686ed4
...
@@ -56,12 +56,12 @@ public class PropertySourcesPropertyValuesTests {
...
@@ -56,12 +56,12 @@ public class PropertySourcesPropertyValuesTests {
});
});
this
.
propertySources
.
addFirst
(
new
MapPropertySource
(
"map"
,
Collections
this
.
propertySources
.
addFirst
(
new
MapPropertySource
(
"map"
,
Collections
.<
String
,
Object
>
singletonMap
(
"name"
,
"${foo}"
)));
.<
String
,
Object
>
singletonMap
(
"name"
,
"${foo}"
)));
}
}
@Test
@Test
public
void
testTypesPreserved
()
{
public
void
testTypesPreserved
()
{
Map
<
String
,
Object
>
map
=
Collections
.<
String
,
Object
>
singletonMap
(
"name"
,
123
);
Map
<
String
,
Object
>
map
=
Collections
.<
String
,
Object
>
singletonMap
(
"name"
,
123
);
this
.
propertySources
.
replace
(
"map"
,
new
MapPropertySource
(
"map"
,
map
));
this
.
propertySources
.
replace
(
"map"
,
new
MapPropertySource
(
"map"
,
map
));
PropertySourcesPropertyValues
propertyValues
=
new
PropertySourcesPropertyValues
(
PropertySourcesPropertyValues
propertyValues
=
new
PropertySourcesPropertyValues
(
this
.
propertySources
);
this
.
propertySources
);
...
@@ -142,7 +142,7 @@ public class PropertySourcesPropertyValuesTests {
...
@@ -142,7 +142,7 @@ public class PropertySourcesPropertyValuesTests {
@Test
@Test
public
void
testOverriddenValue
()
{
public
void
testOverriddenValue
()
{
this
.
propertySources
.
addFirst
(
new
MapPropertySource
(
"new"
,
Collections
this
.
propertySources
.
addFirst
(
new
MapPropertySource
(
"new"
,
Collections
.<
String
,
Object
>
singletonMap
(
"name"
,
"spam"
)));
.<
String
,
Object
>
singletonMap
(
"name"
,
"spam"
)));
PropertySourcesPropertyValues
propertyValues
=
new
PropertySourcesPropertyValues
(
PropertySourcesPropertyValues
propertyValues
=
new
PropertySourcesPropertyValues
(
this
.
propertySources
);
this
.
propertySources
);
assertEquals
(
"spam"
,
propertyValues
.
getPropertyValue
(
"name"
).
getValue
());
assertEquals
(
"spam"
,
propertyValues
.
getPropertyValue
(
"name"
).
getValue
());
...
@@ -170,7 +170,7 @@ public class PropertySourcesPropertyValuesTests {
...
@@ -170,7 +170,7 @@ public class PropertySourcesPropertyValuesTests {
TestBean
target
=
new
TestBean
();
TestBean
target
=
new
TestBean
();
DataBinder
binder
=
new
DataBinder
(
target
);
DataBinder
binder
=
new
DataBinder
(
target
);
this
.
propertySources
.
addFirst
(
new
MapPropertySource
(
"another"
,
Collections
this
.
propertySources
.
addFirst
(
new
MapPropertySource
(
"another"
,
Collections
.<
String
,
Object
>
singletonMap
(
"something"
,
"${nonexistent}"
)));
.<
String
,
Object
>
singletonMap
(
"something"
,
"${nonexistent}"
)));
binder
.
bind
(
new
PropertySourcesPropertyValues
(
this
.
propertySources
));
binder
.
bind
(
new
PropertySourcesPropertyValues
(
this
.
propertySources
));
assertEquals
(
"bar"
,
target
.
getName
());
assertEquals
(
"bar"
,
target
.
getName
());
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/builder/SpringApplicationBuilderTests.java
View file @
15686ed4
...
@@ -75,7 +75,7 @@ public class SpringApplicationBuilderTests {
...
@@ -75,7 +75,7 @@ public class SpringApplicationBuilderTests {
SpringApplicationBuilder
application
=
new
SpringApplicationBuilder
()
SpringApplicationBuilder
application
=
new
SpringApplicationBuilder
()
.
sources
(
ExampleConfig
.
class
)
.
sources
(
ExampleConfig
.
class
)
.
contextClass
(
StaticApplicationContext
.
class
)
.
contextClass
(
StaticApplicationContext
.
class
)
.
properties
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"foo"
));
.
properties
(
Collections
.<
String
,
Object
>
singletonMap
(
"bar"
,
"foo"
));
this
.
context
=
application
.
run
();
this
.
context
=
application
.
run
();
assertThat
(
this
.
context
.
getEnvironment
().
getProperty
(
"bar"
),
is
(
equalTo
(
"foo"
)));
assertThat
(
this
.
context
.
getEnvironment
().
getProperty
(
"bar"
),
is
(
equalTo
(
"foo"
)));
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/MockEmbeddedServletContainerFactory.java
View file @
15686ed4
...
@@ -149,7 +149,7 @@ public class MockEmbeddedServletContainerFactory extends
...
@@ -149,7 +149,7 @@ public class MockEmbeddedServletContainerFactory extends
}
}
});
});
given
(
this
.
servletContext
.
getAttributeNames
()).
willReturn
(
given
(
this
.
servletContext
.
getAttributeNames
()).
willReturn
(
MockEmbeddedServletContainer
.<
String
>
emptyEnumeration
());
MockEmbeddedServletContainer
.<
String
>
emptyEnumeration
());
given
(
this
.
servletContext
.
getNamedDispatcher
(
"default"
)).
willReturn
(
given
(
this
.
servletContext
.
getNamedDispatcher
(
"default"
)).
willReturn
(
mock
(
RequestDispatcher
.
class
));
mock
(
RequestDispatcher
.
class
));
for
(
ServletContextInitializer
initializer
:
this
.
initializers
)
{
for
(
ServletContextInitializer
initializer
:
this
.
initializers
)
{
...
...
spring-boot/src/test/java/org/springframework/boot/context/properties/EnableConfigurationPropertiesTests.java
View file @
15686ed4
...
@@ -157,7 +157,7 @@ public class EnableConfigurationPropertiesTests {
...
@@ -157,7 +157,7 @@ public class EnableConfigurationPropertiesTests {
public
void
testExceptionOnValidation
()
{
public
void
testExceptionOnValidation
()
{
this
.
context
.
register
(
ExceptionIfInvalidTestConfiguration
.
class
);
this
.
context
.
register
(
ExceptionIfInvalidTestConfiguration
.
class
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"name:foo"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"name:foo"
);
this
.
expected
.
expectCause
(
Matchers
.<
Throwable
>
instanceOf
(
BindException
.
class
));
this
.
expected
.
expectCause
(
Matchers
.<
Throwable
>
instanceOf
(
BindException
.
class
));
this
.
context
.
refresh
();
this
.
context
.
refresh
();
}
}
...
...
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