PropertyImpl: non-trimmed key/value delimiter detection fixed

This commit is contained in:
Dmitry Batkovich
2015-03-11 15:03:09 +03:00
parent b8a19c4544
commit 4ea0f44584
@@ -448,8 +448,13 @@ public class PropertyImpl extends PropertiesStubElementImpl<PropertyStub> implem
if (delimiter == null) {
return null;
}
final String separatorText = delimiter.getText();
LOG.assertTrue(separatorText.length() == 1);
String separatorText = delimiter.getText();
LOG.assertTrue(separatorText.length() > 0);
separatorText = separatorText.trim();
if (separatorText.isEmpty()) {
separatorText = " ";
}
LOG.assertTrue(separatorText.length() == 1, "\"" + separatorText + "\"");
return separatorText.charAt(0);
}