Community
Participate
Working Groups
Build Identifier: M20080911-1700 The serialization OPTION_FORMATTED in XMI does not remove the last line break. This prevents to have a cross-platform identical serialization (as unix and windows will either use \r\n or \n for the line break) Reproducible: Always Steps to Reproduce: 1. Use XMIResourceImpl and set OPTION_FORMATTED to false 2. Serialize an EObject 3. There is a \r\n at the end of the serialized stream. There should be no line break characters.
I'm not sure it's a good idea to try to produce a serialization without a line terminator on the last line. Most editors would not produce such a result and will add such a character as soon as you try to edit a file without it. Also, I can imagine changing this behavior adversely affecting existing clients too. Looking closely, the xml header is on a different line too, so I'm not sure how removing the final linebreak is a good thing. The whole point of this option was to eliminate the large amount of whitespace, i.e., to reduce significantly the number of bytes that need to be transmitted, not to produce a result that's the same across platforms because it includes no line separators.