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

inputStream.read returns -1, indicating end-of-file and doesn't throw an Exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Default
    • Resolution: Fixed
    • Affects Version/s: 1.0.2, 1.0.3
    • Fix Version/s: 1.1.0
    • Component/s: Types
    • Labels:
      None

      Description

      org.openfast.template.type.codec.UnsignedInteger contains a method

      public ScalarValue decode(InputStream in) {
      long value = 0;
      int byt;
      try {
      do

      { byt = in.read(); value = (value << 7) | (byt & 0x7f); }

      while ((byt & 0x80) == 0);
      } catch (IOException e)

      { throw new RuntimeException(e); }

      return createValue(value);
      }

      it does not checks for eof condition (that return could be -1)

        Attachments

          Activity

            People

            • Assignee:
              jacob_northey Jacob Northey
              Reporter:
              j ivan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: