Skip to content

Commit e0252ad

Browse files
jhoellercbeams
authored andcommitted
"file-encoding" attribute value is being applied correctly (SPR-8024)
1 parent 4b138e0 commit e0252ad

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

org.springframework.context/src/main/java/org/springframework/context/config/AbstractPropertyLoadingBeanDefinitionParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2011 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ protected void doParse(Element element, BeanDefinitionBuilder builder) {
5353

5454
String fileEncoding = element.getAttribute("file-encoding");
5555
if (StringUtils.hasLength(fileEncoding)) {
56-
builder.addPropertyReference("fileEncoding", fileEncoding);
56+
builder.addPropertyValue("fileEncoding", fileEncoding);
5757
}
5858

5959
String order = element.getAttribute("order");

org.springframework.context/src/test/resources/org/springframework/context/config/contextNamespaceHandlerTests-location.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
88

99
<context:property-placeholder
10-
location="classpath*:/org/springframework/context/config/test-*.properties,classpath*:/org/springframework/context/config/empty-*.properties,classpath*:/org/springframework/context/config/missing-*.properties" />
10+
location="classpath*:/org/springframework/context/config/test-*.properties,classpath*:/org/springframework/context/config/empty-*.properties,classpath*:/org/springframework/context/config/missing-*.properties"
11+
file-encoding="ISO-8859-1"/>
1112

1213
<bean id="foo" class="java.lang.String">
1314
<constructor-arg value="${foo}" />

0 commit comments

Comments
 (0)