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
42cb053d
Commit
42cb053d
authored
Jan 24, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace and remove deprecated API usage
parent
f2df6e80
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
12 deletions
+9
-12
SpringBootHypermediaApplication.java
...t/actuate/hypermedia/SpringBootHypermediaApplication.java
+1
-3
MessageInterpolatorFactory.java
...framework/boot/validation/MessageInterpolatorFactory.java
+1
-1
JettyEmbeddedServletContainerFactoryTests.java
...dded/jetty/JettyEmbeddedServletContainerFactoryTests.java
+4
-4
TomcatEmbeddedServletContainerFactoryTests.java
...ed/tomcat/TomcatEmbeddedServletContainerFactoryTests.java
+3
-4
No files found.
spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/SpringBootHypermediaApplication.java
View file @
42cb053d
/*
/*
* 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.
...
@@ -34,7 +34,6 @@ import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
...
@@ -34,7 +34,6 @@ import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
import
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
;
import
org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.lang.UsesJava8
;
// Flyway must go first
// Flyway must go first
@SpringBootApplication
@SpringBootApplication
...
@@ -66,7 +65,6 @@ public class SpringBootHypermediaApplication implements CommandLineRunner {
...
@@ -66,7 +65,6 @@ public class SpringBootHypermediaApplication implements CommandLineRunner {
createEvent
(
"2016-11-01T12:00:00Z"
,
"admin"
,
"AUTHENTICATION_SUCCESS"
));
createEvent
(
"2016-11-01T12:00:00Z"
,
"admin"
,
"AUTHENTICATION_SUCCESS"
));
}
}
@UsesJava8
private
AuditEvent
createEvent
(
String
instant
,
String
principal
,
String
type
)
{
private
AuditEvent
createEvent
(
String
instant
,
String
principal
,
String
type
)
{
return
new
AuditEvent
(
Date
.
from
(
Instant
.
parse
(
instant
)),
principal
,
type
,
return
new
AuditEvent
(
Date
.
from
(
Instant
.
parse
(
instant
)),
principal
,
type
,
Collections
.<
String
,
Object
>
emptyMap
());
Collections
.<
String
,
Object
>
emptyMap
());
...
...
spring-boot/src/main/java/org/springframework/boot/validation/MessageInterpolatorFactory.java
View file @
42cb053d
...
@@ -76,7 +76,7 @@ public class MessageInterpolatorFactory implements ObjectFactory<MessageInterpol
...
@@ -76,7 +76,7 @@ public class MessageInterpolatorFactory implements ObjectFactory<MessageInterpol
private
MessageInterpolator
getFallback
(
String
fallback
)
{
private
MessageInterpolator
getFallback
(
String
fallback
)
{
Class
<?>
interpolatorClass
=
ClassUtils
.
resolveClassName
(
fallback
,
null
);
Class
<?>
interpolatorClass
=
ClassUtils
.
resolveClassName
(
fallback
,
null
);
Object
interpolator
=
BeanUtils
.
instantiate
(
interpolatorClass
);
Object
interpolator
=
BeanUtils
.
instantiate
Class
(
interpolatorClass
);
return
(
MessageInterpolator
)
interpolator
;
return
(
MessageInterpolator
)
interpolator
;
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java
View file @
42cb053d
/*
/*
* 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.
...
@@ -51,7 +51,7 @@ import org.springframework.boot.web.servlet.ServletRegistrationBean;
...
@@ -51,7 +51,7 @@ import org.springframework.boot.web.servlet.ServletRegistrationBean;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
Object
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
Mockito
.
inOrder
;
import
static
org
.
mockito
.
Mockito
.
inOrder
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
...
@@ -84,7 +84,7 @@ public class JettyEmbeddedServletContainerFactoryTests
...
@@ -84,7 +84,7 @@ public class JettyEmbeddedServletContainerFactoryTests
this
.
container
=
factory
.
getEmbeddedServletContainer
();
this
.
container
=
factory
.
getEmbeddedServletContainer
();
InOrder
ordered
=
inOrder
((
Object
[])
configurations
);
InOrder
ordered
=
inOrder
((
Object
[])
configurations
);
for
(
Configuration
configuration
:
configurations
)
{
for
(
Configuration
configuration
:
configurations
)
{
ordered
.
verify
(
configuration
).
configure
(
(
WebAppContext
)
anyObject
(
));
ordered
.
verify
(
configuration
).
configure
(
any
(
WebAppContext
.
class
));
}
}
}
}
...
@@ -100,7 +100,7 @@ public class JettyEmbeddedServletContainerFactoryTests
...
@@ -100,7 +100,7 @@ public class JettyEmbeddedServletContainerFactoryTests
this
.
container
=
factory
.
getEmbeddedServletContainer
();
this
.
container
=
factory
.
getEmbeddedServletContainer
();
InOrder
ordered
=
inOrder
((
Object
[])
configurations
);
InOrder
ordered
=
inOrder
((
Object
[])
configurations
);
for
(
JettyServerCustomizer
configuration
:
configurations
)
{
for
(
JettyServerCustomizer
configuration
:
configurations
)
{
ordered
.
verify
(
configuration
).
customize
(
(
Server
)
anyObject
(
));
ordered
.
verify
(
configuration
).
customize
(
any
(
Server
.
class
));
}
}
}
}
...
...
spring-boot/src/test/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactoryTests.java
View file @
42cb053d
...
@@ -59,7 +59,6 @@ import org.springframework.util.SocketUtils;
...
@@ -59,7 +59,6 @@ import org.springframework.util.SocketUtils;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
junit
.
Assert
.
fail
;
import
static
org
.
junit
.
Assert
.
fail
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
ArgumentMatchers
.
any
;
import
static
org
.
mockito
.
ArgumentMatchers
.
anyObject
;
import
static
org
.
mockito
.
BDDMockito
.
given
;
import
static
org
.
mockito
.
BDDMockito
.
given
;
import
static
org
.
mockito
.
Mockito
.
inOrder
;
import
static
org
.
mockito
.
Mockito
.
inOrder
;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
static
org
.
mockito
.
Mockito
.
mock
;
...
@@ -119,7 +118,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
...
@@ -119,7 +118,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
this
.
container
=
factory
.
getEmbeddedServletContainer
();
this
.
container
=
factory
.
getEmbeddedServletContainer
();
InOrder
ordered
=
inOrder
((
Object
[])
listeners
);
InOrder
ordered
=
inOrder
((
Object
[])
listeners
);
for
(
LifecycleListener
listener
:
listeners
)
{
for
(
LifecycleListener
listener
:
listeners
)
{
ordered
.
verify
(
listener
).
lifecycleEvent
(
(
LifecycleEvent
)
anyObject
(
));
ordered
.
verify
(
listener
).
lifecycleEvent
(
any
(
LifecycleEvent
.
class
));
}
}
}
}
...
@@ -135,7 +134,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
...
@@ -135,7 +134,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
this
.
container
=
factory
.
getEmbeddedServletContainer
();
this
.
container
=
factory
.
getEmbeddedServletContainer
();
InOrder
ordered
=
inOrder
((
Object
[])
listeners
);
InOrder
ordered
=
inOrder
((
Object
[])
listeners
);
for
(
TomcatContextCustomizer
listener
:
listeners
)
{
for
(
TomcatContextCustomizer
listener
:
listeners
)
{
ordered
.
verify
(
listener
).
customize
(
(
Context
)
anyObject
(
));
ordered
.
verify
(
listener
).
customize
(
any
(
Context
.
class
));
}
}
}
}
...
@@ -151,7 +150,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
...
@@ -151,7 +150,7 @@ public class TomcatEmbeddedServletContainerFactoryTests
this
.
container
=
factory
.
getEmbeddedServletContainer
();
this
.
container
=
factory
.
getEmbeddedServletContainer
();
InOrder
ordered
=
inOrder
((
Object
[])
listeners
);
InOrder
ordered
=
inOrder
((
Object
[])
listeners
);
for
(
TomcatConnectorCustomizer
listener
:
listeners
)
{
for
(
TomcatConnectorCustomizer
listener
:
listeners
)
{
ordered
.
verify
(
listener
).
customize
(
(
Connector
)
anyObject
(
));
ordered
.
verify
(
listener
).
customize
(
any
(
Connector
.
class
));
}
}
}
}
...
...
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