Merge branch '2.0.x'
This commit is contained in:
@@ -135,7 +135,7 @@ class OriginTrackedPropertiesLoader {
|
||||
reader.read();
|
||||
}
|
||||
Origin origin = new TextResourceOrigin(this.resource, location);
|
||||
return OriginTrackedValue.of(buffer.toString().trim(), origin);
|
||||
return OriginTrackedValue.of(buffer.toString(), origin);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -248,6 +248,12 @@ public class OriginTrackedPropertiesLoaderTests {
|
||||
assertThat(getValue(value)).isEqualTo("æ×ÈÅÞßáñÀÿ");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getPropertyWithTrailingSpace() {
|
||||
OriginTrackedValue value = this.properties.get("test-with-trailing-space");
|
||||
assertThat(getValue(value)).isEqualTo("trailing ");
|
||||
}
|
||||
|
||||
private Object getValue(OriginTrackedValue value) {
|
||||
return (value != null ? value.getValue() : null);
|
||||
}
|
||||
|
||||
@@ -40,3 +40,5 @@ test-multiline-immediate-bang=\
|
||||
|
||||
#test ISO 8859-1
|
||||
test-iso8859-1-chars=<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
test-with-trailing-space= trailing
|
||||
|
||||
Reference in New Issue
Block a user