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
3342504d
Commit
3342504d
authored
Jan 13, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.4.x' into 1.5.x
parents
1ce6e339
7298b2dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ErrorPageFilter.java
...org/springframework/boot/web/support/ErrorPageFilter.java
+1
-1
ErrorPageFilterTests.java
...pringframework/boot/web/support/ErrorPageFilterTests.java
+3
-3
No files found.
spring-boot/src/main/java/org/springframework/boot/web/support/ErrorPageFilter.java
View file @
3342504d
...
@@ -177,7 +177,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
...
@@ -177,7 +177,7 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
}
}
setErrorAttributes
(
request
,
500
,
ex
.
getMessage
());
setErrorAttributes
(
request
,
500
,
ex
.
getMessage
());
request
.
setAttribute
(
ERROR_EXCEPTION
,
ex
);
request
.
setAttribute
(
ERROR_EXCEPTION
,
ex
);
request
.
setAttribute
(
ERROR_EXCEPTION_TYPE
,
ex
.
getClass
()
.
getName
()
);
request
.
setAttribute
(
ERROR_EXCEPTION_TYPE
,
ex
.
getClass
());
response
.
reset
();
response
.
reset
();
response
.
sendError
(
500
,
ex
.
getMessage
());
response
.
sendError
(
500
,
ex
.
getMessage
());
request
.
getRequestDispatcher
(
path
).
forward
(
request
,
response
);
request
.
getRequestDispatcher
(
path
).
forward
(
request
,
response
);
...
...
spring-boot/src/test/java/org/springframework/boot/web/support/ErrorPageFilterTests.java
View file @
3342504d
...
@@ -262,7 +262,7 @@ public class ErrorPageFilterTests {
...
@@ -262,7 +262,7 @@ public class ErrorPageFilterTests {
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_MESSAGE
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_MESSAGE
))
.
isEqualTo
(
"BAD"
);
.
isEqualTo
(
"BAD"
);
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_EXCEPTION_TYPE
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_EXCEPTION_TYPE
))
.
isEqualTo
(
RuntimeException
.
class
.
getName
()
);
.
isEqualTo
(
RuntimeException
.
class
);
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_REQUEST_URI
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_REQUEST_URI
))
.
isEqualTo
(
"/test/path"
);
.
isEqualTo
(
"/test/path"
);
assertThat
(
this
.
response
.
isCommitted
()).
isTrue
();
assertThat
(
this
.
response
.
isCommitted
()).
isTrue
();
...
@@ -319,7 +319,7 @@ public class ErrorPageFilterTests {
...
@@ -319,7 +319,7 @@ public class ErrorPageFilterTests {
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_MESSAGE
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_MESSAGE
))
.
isEqualTo
(
"BAD"
);
.
isEqualTo
(
"BAD"
);
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_EXCEPTION_TYPE
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_EXCEPTION_TYPE
))
.
isEqualTo
(
IllegalStateException
.
class
.
getName
()
);
.
isEqualTo
(
IllegalStateException
.
class
);
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_REQUEST_URI
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_REQUEST_URI
))
.
isEqualTo
(
"/test/path"
);
.
isEqualTo
(
"/test/path"
);
assertThat
(
this
.
response
.
isCommitted
()).
isTrue
();
assertThat
(
this
.
response
.
isCommitted
()).
isTrue
();
...
@@ -493,7 +493,7 @@ public class ErrorPageFilterTests {
...
@@ -493,7 +493,7 @@ public class ErrorPageFilterTests {
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_MESSAGE
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_MESSAGE
))
.
isEqualTo
(
"BAD"
);
.
isEqualTo
(
"BAD"
);
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_EXCEPTION_TYPE
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_EXCEPTION_TYPE
))
.
isEqualTo
(
RuntimeException
.
class
.
getName
()
);
.
isEqualTo
(
RuntimeException
.
class
);
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_REQUEST_URI
))
assertThat
(
this
.
request
.
getAttribute
(
RequestDispatcher
.
ERROR_REQUEST_URI
))
.
isEqualTo
(
"/test/path"
);
.
isEqualTo
(
"/test/path"
);
assertThat
(
this
.
response
.
isCommitted
()).
isTrue
();
assertThat
(
this
.
response
.
isCommitted
()).
isTrue
();
...
...
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