Uploaded image for project: 'OpenFAST'
  1. OpenFAST
  2. FAST-31

Openfast can not encode optional unicode string with 127 bytes length

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.3
    • Component/s: Types
    • Labels:
      None

      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

        Attachments

          Activity

            People

            • Assignee:
              jacob_northey Jacob Northey
              Reporter:
              alx.utkin Alexey Utkin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: