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
129c2096
Commit
129c2096
authored
Oct 19, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.4.x' into 1.5.x
parents
3ea09d2e
943a054b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
ErrorPageFilter.java
...org/springframework/boot/web/support/ErrorPageFilter.java
+5
-14
No files found.
spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java
View file @
129c2096
...
...
@@ -83,8 +83,6 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
private
final
Map
<
Class
<?>,
String
>
exceptions
=
new
HashMap
<
Class
<?>,
String
>();
private
final
Map
<
Class
<?>,
Class
<?>>
subtypes
=
new
HashMap
<
Class
<?>,
Class
<?>>();
private
final
OncePerRequestFilter
delegate
=
new
OncePerRequestFilter
()
{
@Override
...
...
@@ -217,19 +215,12 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
}
private
String
getErrorPath
(
Class
<?>
type
)
{
if
(
this
.
exceptions
.
containsKey
(
type
))
{
return
this
.
exceptions
.
get
(
type
);
}
if
(
this
.
subtypes
.
containsKey
(
type
))
{
return
this
.
exceptions
.
get
(
this
.
subtypes
.
get
(
type
));
}
Class
<?>
subtype
=
type
;
while
(
subtype
!=
Object
.
class
)
{
subtype
=
subtype
.
getSuperclass
();
if
(
this
.
exceptions
.
containsKey
(
subtype
))
{
this
.
subtypes
.
put
(
subtype
,
type
);
return
this
.
exceptions
.
get
(
subtype
);
while
(
type
!=
Object
.
class
)
{
String
path
=
this
.
exceptions
.
get
(
type
);
if
(
path
!=
null
)
{
return
path
;
}
type
=
type
.
getSuperclass
();
}
return
this
.
global
;
}
...
...
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