[FAST-31] Openfast can not encode optional unicode string with 127 bytes length Created: 19/Nov/10  Updated: 20/Oct/11  Resolved: 20/Oct/11

Status: Resolved
Project: OpenFAST
Component/s: Types
Affects Version/s: 1.0.0
Fix Version/s: 1.0.3

Type: Bug Priority: Critical
Reporter: Alexey Utkin Assignee: Jacob Northey
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File bytevector.patch    

 Description   

Test case:
public void testString127() throws Exception {
TypeCodec codec = new NullableUnicodeString();
byte[] b = new byte[127];
Arrays.fill(b, (byte)'1');
String expected = new String(b);
byte[] bytes = codec.encode(new StringValue(expected));
final ScalarValue value = codec.decode(new ByteArrayInputStream(bytes));
String actual = value.toString();
Assert.assertEquals(expected, actual);
}

Patch file is attached


Generated at Sat Nov 23 17:51:03 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.