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
8ced867e
Commit
8ced867e
authored
Dec 28, 2018
by
igor-suhorukov
Committed by
Stephane Nicoll
Dec 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Optional value in more functional style
See gh-15575
parent
7946bec1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
CompositeHandlerAdapter.java
...te/autoconfigure/web/servlet/CompositeHandlerAdapter.java
+3
-4
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/CompositeHandlerAdapter.java
View file @
8ced867e
...
@@ -63,10 +63,9 @@ class CompositeHandlerAdapter implements HandlerAdapter {
...
@@ -63,10 +63,9 @@ class CompositeHandlerAdapter implements HandlerAdapter {
@Override
@Override
public
long
getLastModified
(
HttpServletRequest
request
,
Object
handler
)
{
public
long
getLastModified
(
HttpServletRequest
request
,
Object
handler
)
{
Optional
<
HandlerAdapter
>
adapter
=
getAdapter
(
handler
);
Optional
<
HandlerAdapter
>
adapter
=
getAdapter
(
handler
);
if
(
adapter
.
isPresent
())
{
return
adapter
return
adapter
.
get
().
getLastModified
(
request
,
handler
);
.
map
((
handlerAdapter
)
->
handlerAdapter
.
getLastModified
(
request
,
handler
))
}
.
orElse
(
0L
);
return
0
;
}
}
private
Optional
<
HandlerAdapter
>
getAdapter
(
Object
handler
)
{
private
Optional
<
HandlerAdapter
>
getAdapter
(
Object
handler
)
{
...
...
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