Browse Source

Fix breaking logic around getFilename() call

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3816 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Chris Beams 15 years ago
parent
commit
5898259f1e
  1. 9
      org.springframework.core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java

9
org.springframework.core/src/main/java/org/springframework/core/io/support/PropertiesLoaderSupport.java

@ -180,11 +180,10 @@ public abstract class PropertiesLoaderSupport { @@ -180,11 +180,10 @@ public abstract class PropertiesLoaderSupport {
try {
is = location.getInputStream();
if (location instanceof AbstractFileResolvingResource) {
String filename = location.getFilename();
if (filename != null && filename.endsWith(XML_FILE_EXTENSION)) {
this.propertiesPersister.loadFromXml(props, is);
}
String filename = (location instanceof AbstractFileResolvingResource) ?
location.getFilename() : null;
if (filename != null && filename.endsWith(XML_FILE_EXTENSION)) {
this.propertiesPersister.loadFromXml(props, is);
}
else {
if (this.fileEncoding != null) {

Loading…
Cancel
Save