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
e6d60d93
Commit
e6d60d93
authored
Sep 22, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure the use of UTF-8 encoding in ImageBannerTests
Closes gh-18301
parent
ec2483e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
ImageBannerTests.java
.../test/java/org/springframework/boot/ImageBannerTests.java
+8
-2
No files found.
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java
View file @
e6d60d93
...
@@ -18,6 +18,7 @@ package org.springframework.boot;
...
@@ -18,6 +18,7 @@ package org.springframework.boot;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintStream
;
import
java.io.PrintStream
;
import
java.io.UnsupportedEncodingException
;
import
org.junit.jupiter.api.AfterEach
;
import
org.junit.jupiter.api.AfterEach
;
import
org.junit.jupiter.api.BeforeEach
;
import
org.junit.jupiter.api.BeforeEach
;
...
@@ -204,8 +205,13 @@ class ImageBannerTests {
...
@@ -204,8 +205,13 @@ class ImageBannerTests {
ConfigurableEnvironment
environment
=
new
MockEnvironment
();
ConfigurableEnvironment
environment
=
new
MockEnvironment
();
TestPropertySourceUtils
.
addInlinedPropertiesToEnvironment
(
environment
,
properties
);
TestPropertySourceUtils
.
addInlinedPropertiesToEnvironment
(
environment
,
properties
);
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
out
=
new
ByteArrayOutputStream
();
banner
.
printBanner
(
environment
,
getClass
(),
new
PrintStream
(
out
));
try
{
return
out
.
toString
();
banner
.
printBanner
(
environment
,
getClass
(),
new
PrintStream
(
out
,
false
,
"UTF-8"
));
return
out
.
toString
(
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
ex
)
{
throw
new
IllegalStateException
(
ex
);
}
}
}
}
}
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