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
f35af88d
Commit
f35af88d
authored
Oct 10, 2017
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10565 from thiagohirata/fix/#10564
* pr/10565: Update OriginTrackedPropertiesLoader to ISO 8859-1
parents
8e030d47
85e71f23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
OriginTrackedPropertiesLoader.java
...ringframework/boot/env/OriginTrackedPropertiesLoader.java
+2
-1
OriginTrackedPropertiesLoaderTests.java
...ramework/boot/env/OriginTrackedPropertiesLoaderTests.java
+6
-0
test-properties.properties
...s/org/springframework/boot/env/test-properties.properties
+3
-0
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/OriginTrackedPropertiesLoader.java
View file @
f35af88d
...
...
@@ -37,6 +37,7 @@ import org.springframework.util.Assert;
*
* @author Madhura Bhave
* @author Phillip Webb
* @author Thiago Hirata
*/
class
OriginTrackedPropertiesLoader
{
...
...
@@ -154,7 +155,7 @@ class OriginTrackedPropertiesLoader {
CharacterReader
(
Resource
resource
)
throws
IOException
{
this
.
reader
=
new
LineNumberReader
(
new
InputStreamReader
(
resource
.
getInputStream
()));
new
InputStreamReader
(
resource
.
getInputStream
()
,
"8859_1"
));
}
@Override
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java
View file @
f35af88d
...
...
@@ -228,6 +228,12 @@ public class OriginTrackedPropertiesLoaderTests {
assertThat
(
getLocation
(
mango
)).
isEqualTo
(
"27:1"
);
}
@Test
public
void
getPropertyWithISO88591Character
()
throws
Exception
{
OriginTrackedValue
value
=
this
.
properties
.
get
(
"test-iso8859-1-chars"
);
assertThat
(
getValue
(
value
)).
isEqualTo
(
"æ×ÈÅÞßáñÀÿ"
);
}
private
Object
getValue
(
OriginTrackedValue
value
)
{
return
(
value
==
null
?
null
:
value
.
getValue
());
}
...
...
spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/env/test-properties.properties
View file @
f35af88d
...
...
@@ -37,3 +37,6 @@ test-property-value-comment=foo \
!bar #foo
test-multiline-immediate-bang=
\
!foo
#test ISO 8859-1
test-iso8859-1-chars
=
\ No newline at end of file
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