Fix breaking logic around getFilename() call
This commit is contained in:
parent
1a7aebb0dd
commit
f105670cec
|
|
@ -180,12 +180,11 @@ public abstract class PropertiesLoaderSupport {
|
|||
try {
|
||||
is = location.getInputStream();
|
||||
|
||||
if (location instanceof AbstractFileResolvingResource) {
|
||||
String filename = location.getFilename();
|
||||
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) {
|
||||
this.propertiesPersister.load(props, new InputStreamReader(is, this.fileEncoding));
|
||||
|
|
|
|||
Loading…
Reference in New Issue